Navigation:  Macros > Macro Language > Built-in Functions > All Functions (Alphabetical) >


Previous pageReturn to chapter overviewNext page

int = StrToInt(sString)


This macro function converts the string sString into a number.


StrToInt('1024') = 1024

StrToInt('0012') = 12

StrToInt('1.024') = Error !

StrToInt('1,024') = Error !

StrToInt('Elvis') = Error !


Leading zeros are acceptable (ie '0012').


Note :

The string representation of the number should have no formatting (ie. '1024' is OK, but '1.024' or '1,024' will generate an error).

Passing any text that does not represent a number, to this function will generate an error.


Errors generated by this function will be handled according to the value you set for the RUNTIME_ERROR_HANDLING pre-compiler directive. Most of the time this will mean that the Macro will be aborted.


See also : IntToStr.

Topic 108262 updated on 01-Nov-2016.
Topic URL: