string
Differences
This shows you the differences between two versions of the page.
| string [2007/07/13 11:23] – created string initial page snakeman | string [2017/01/21 19:18] (current) – deleted unused page. snakeman | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== String ====== | ||
| - | A **string** is the variable type that can contain text. | ||
| - | |||
| - | ====== Description ====== | ||
| - | |||
| - | A string may consist of any number of ASCII characters and is enclosed by single-quotes (only in ArmA) or double-quotes. In OFP, strings could alternatively also be written enclosed by curled braces, which are reserved for code in ArmA. | ||
| - | |||
| - | **Examples (OFP):** | ||
| - | |||
| - | < | ||
| - | | ||
| - | | ||
| - | </ | ||
| - | |||
| - | **Examples (ArmA):** | ||
| - | |||
| - | < | ||
| - | | ||
| - | | ||
| - | </ | ||
| - | |||
| - | If you want to include double quotes (") in strings enclosed by double quotes, the inside double quotes have to be written twice. | ||
| - | |||
| - | < | ||
| - | | ||
| - | | ||
| - | </ | ||
| - | |||
| - | ====== Operators ====== | ||
| - | |||
| - | The only basic operator to be used on strings is " | ||
| - | |||
| - | < | ||
| - | | ||
| - | </ | ||
| - | |||
| - | ====== Commands ====== | ||
| - | |||
| - | You can convert any type to a string using the command [[format]]. You can also use that command to build together a string out of different elements. See the documentation of [[format]] for a closer description. | ||
| - | |||
| - | < | ||
| - | | ||
| - | hint _string | ||
| - | |||
| - | => [" | ||
| - | </ | ||
| - | |||
| - | ====== Limitations ====== | ||
| - | |||
| - | Since **ArmA** strings seem not to have any limitation in length. | ||
| - | |||
| - | In **OFP v1.96**, manipulating and using strings above 2056 characters in length may crash the game. | ||
string.1184325789.txt.gz · Last modified: 2007/07/13 11:23 (external edit)
