# strtolΒΆ

strtol converts a string matrix to a long-integer value (32 bit).

- rmReal = strtol(smString)
- rmReal = strtol(smString, nBase)
- <rmReal, smStopString> = strtol(smString)
- <rmReal, smStopString> = strtol(smString, nBase)

**Return Value**

*rmReal* is a matrix of real numbers.*smStopString* contains the partn *smString*
that cannot be converted to a number.

**Parameters**

- smString
*smString*is a string matrix.

- 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.

**Example**

```
* strtol("123")
123.0000
* strtol("101", 2)
5.0000
* strtol("0xA", 16)
10.0000
* strtol("Hallo")
0.0000
* <r,s> = strtol("123Hallo")
* r
123.0000
* s
Hallo
```

See also

_{id-309376}