.. highlightlang:: us .. index:: strtol .. _strtol: strtol ====== .. us.tag strtol ENGLISH STR Programming.Convert :ref:`strtol` converts a string matrix to a long-integer value (32 bit). .. function:: rmReal = strtol(smString) rmReal = strtol(smString, nBase) = strtol(smString) = strtol(smString, nBase) .. us.return **Return Value** *rmReal* is a matrix of real numbers.*smStopString* contains the partn *smString* that cannot be converted to a number. .. us.params **Parameters** .. uparam:: smString *smString* is a string matrix. .. uparam:: nBase *nBase* is used as the base of the number. If base is 0, the initial characters of the string are used to determine the base. If the first character is 0 and the second character is not x or X, then the string is interpreted as an octal value; otherwise, it is interpreted as a decimal value. If the first character is 0 and the second character is x or X, then the string is interpreted as a hexadecimal number. The letters a-z or A-Z are assigned the values 10 through 35; only letters whose assigned values are less than *nBase* are permitted. .. us.example **Example** :: * strtol("123") 123.0000 * strtol("101", 2) 5.0000 * strtol("0xA", 16) 10.0000 * strtol("Hallo") 0.0000 * = strtol("123Hallo") * r 123.0000 * s Hallo .. seealso:: :ref:`overview-strings`, :ref:`strtoull`, :ref:`sprintf`, :ref:`strtod`, :ref:`ltostr` :sub:`id-309376`