Cicode Programming Reference > Converting and Formatting Cicode Variables > Converting Variable Integers to Strings

Converting Variable Integers to Strings

To convert an integer variable to a string:

IntVar=5;
StringVar=IntVar;

The value of StringVar is set to "5".

The format of the string is specified when the variable is defined in the database. However you can override this default format with the string format (:) operator, and use the # format specifier to set a new format. For example:

IntVar=5;
StringVar=IntVar:####

The value of StringVar = " 5". (The '#' formatting characters determine the size and number of decimal places contained in the string, that is a length of 4 with no decimal places.)

See Also

Converting and Formatting Cicode Variables

Using Cicode Files