format
Differences
This shows you the differences between two versions of the page.
format [2008/05/05 23:54] – created format initial page snakeman | format [2017/01/21 19:15] (current) – deleted unused page. snakeman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Format ====== | ||
- | Composes a string containing other variables or other variable types. | ||
- | |||
- | Converts any variable type to a string. | ||
- | |||
- | If you want to convert a string back to a number, use call. | ||
- | |||
- | The array used with this command has to contain at least two items. | ||
- | |||
- | **Syntax**: | ||
- | < | ||
- | String = format [" | ||
- | </ | ||
- | |||
- | **Parameters**: | ||
- | FormatString: | ||
- | var1: Any Value - variable referenced by %1\\ | ||
- | var2: Any Value - variable referenced by %2, and so on | ||
- | |||
- | **Return Value**:\\ | ||
- | String - The full string is returned. | ||
- | |||
- | **Example**: | ||
- | < | ||
- | format [" | ||
- | </ | ||
- | |||
- | The format command is very strong in combination with call. Dynamic code can be created using format and then executed with call. It is not advisable to use this command with string arguments only. Better use + for string concatenation then. If variables don't exist, their value as string is generally " | ||
- | |||
- | Object array parameters work very nicely. Eg:\\ | ||
- | < | ||
- | _MyArray = [Obj1, Obj2, Obj3]; | ||
- | Hint Format[" | ||
- | </ |
format.1210031684.txt.gz · Last modified: 2008/05/05 23:54 by snakeman