Previous:String Literals   Main Index   Next:String Functions



String Identifiers

String identifiers may be declared to make scene files more readable and to parameterize scenes so that changing a single declaration changes many values. An identifier is declared as follows.

STRING_DECLARATION:
#declare IDENTIFIER = STRING |
#local IDENTIFIER = STRING

Where IDENTIFIER is the name of the identifier up to 40 characters long and STRING is any valid string specification. Note that unlike floats, vectors, or colors, there need not be a semi-colon at the end of the declaration. See "#declare vs. #local" for information on identifier scope. Here are some examples...

 #declare Font_Name = "ariel.ttf"

 #declare Inc_File = "myfile.inc"

 #declare Name = "John"

 #declare Name = concat(Name," Doe")

As the last example shows, you can re-declare a string identifier and may use previously declared values in that re-declaration.



Previous:String Literals   Main Index   Next:String Functions