MoneyWorks Manual
Edit
Text Operators
There are two text (string) operator (and a number of functions for the manipulation of strings, see Functions.)
Symbol | Operation | Usage |
---|---|---|
+ | string concatenation | A + B Returns B concatenated to A. Both A and B must be strings: |
* | replication | A * n Returns a string that repeats A n times., where n is a number. Handy for making simple bar charts in reports. |
For example:
"Bother" + " said Pooh"
— results in "Bother said Pooh"
"Me" * 5
— results in "MeMeMeMeMe"
If one of the operands is a number or a date, it will be promoted to a string. Thus:
5 + "6"
yields “56” (or possibly even “5.006”, depending on formatting) because the 5 is promoted to a string and the result is concatenation rather than numeric addition. If you want to force numeric addition in this case, you would use:
5 + TextToNum("6")
which would give a result of 11.