String: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:
'''Compatibility notes:'''
'''Compatibility notes:'''


Since ArmA, strings can also be enclosed in apostrophes, like 'Hello'.
'''Arma'''
 
Prior to Arma, strings were declared simply as a line of text up to end of line.
eg
TokenName=any strange thing you like;
 
the 'TokenName' was a 'known' keyword to the ofp engine. Model= eg. It could ''only'' be a string.
 
Special cases existed such as
 
TokenName = ""a    very    finny line  with "Qoutes" ";
 
which essentially removed doubt for the compiler, where doubt might have existed.
 
Prior to Arma "Quotes" were largely optional.
 
Since ArmA, strings can also be alternatively enclosed in apostrophes, like 'Hello'. '''BUT''' strings MUST be enclosed Period.


Before ArmA, strings could be enclosed in curled braces, as there was no difference between strings and code. In ArmA code needs to be distinguished clearly strings can no longer use { } syntax.
Before ArmA, strings could be enclosed in curled braces, as there was no difference between strings and code. In ArmA code needs to be distinguished clearly strings can no longer use { } syntax.


[[Category: Types]]
[[Category: Types]]

Revision as of 06:51, 30 June 2006

Description: ASCII string, e.g. "My name is Victor Troska"

Strings are written enclosed in double quotes, like "Hello".

You can make a string out of any type by using format.

Compatibility notes:

Arma

Prior to Arma, strings were declared simply as a line of text up to end of line. eg

TokenName=any strange thing you like;

the 'TokenName' was a 'known' keyword to the ofp engine. Model= eg. It could only be a string.

Special cases existed such as

TokenName = ""a    very    finny line  with "Qoutes" ";

which essentially removed doubt for the compiler, where doubt might have existed.

Prior to Arma "Quotes" were largely optional.

Since ArmA, strings can also be alternatively enclosed in apostrophes, like 'Hello'. BUT strings MUST be enclosed Period.

Before ArmA, strings could be enclosed in curled braces, as there was no difference between strings and code. In ArmA code needs to be distinguished clearly strings can no longer use { } syntax.