سؤال

Using Maxsctipt: Exporting a file the following code works fine:

caption:"Caption" \
types:"text(*.txt)|*.txt|All|*.*|" \
filename:(sysinfo.currentdir + @"\some_text.txt")

I am wondering what the significance the @ symbol has?

هل كانت مفيدة؟

المحلول

From the maxscript help file:

http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/index.html?url=files/GUID-7F17449E-C377-445C-AC15-CD3BA88A975B.htm,topicNumber=d30e141051

Verbatim String Literals

Verbatim string literals added to MAXScript in 3ds Max 2008 are prefixed by the '@' character and are NOT expanded even if containing backslash escape character sequences like '\t', '\n' or '\r'.

Bottomline you don't need to escape characters in the string if there are any "illegal" characters in it, especially helpful when dealing with paths loads of \ 's

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top