Skip to content
QiTASC.com / intaQt Built-ins /
Conversion Built-ins(toNumber and toString)
/ .. /
Conversion Built-ins(toNumber...










Conversion Built-ins (toNumber and toString)

Conversion Built-ins convert between numbers and strings:

  • toNumber - Takes a string and converts it to a number.

  • toString - Converts a number to a string.

To Number

Syntax

1
<result Number> := toNumber(<numberStr String>)

Returns

The number resulting from the conversion.

Parameter

  • numberStr -The string to be converted into a number

Example

1
2
s := "100"
aNumber := toNumber(s) + 2

To String

Syntax

1
<result String> := toString(<number Number>)

Returns

The string resulting from the conversion.

Parameter

  • number - The number to be converted into a string

Example

1
2
3
s := "100"
aNumber := toNumber(s) + 2
aString := "The number is: " + toString(aNumber)