Property | Value |
---|---|
Hex Value | $EF97 |
Categories | |
Localizations |
|
toString(
Overview
Converts value to a string where value
can be real, complex, an evaluated expression, list, or matrix. String value
displays in classic format
(0) following the mode setting AUTO/DEC or in decimal format
(1).
Comment:CE OS 5.2+
Availability: Token only available from within the Basic editor.
Syntax
toString((value[,format])
Arguments
Name | Type | Optional |
---|---|---|
value | Yes | |
format | Yes |
Location
prgm, E:toString(
, C:toString(
Description
The toString( command, given any value including real numbers, complex numbers, lists, or matrices, returns the string representation of the value of the input.
toString(1337 //returns "1337"
toString({1,2,3} //returns "{1,2,3}"
toString([[1,2][3,4]] //returns "[[1,2][3,4]]"
toString(√-1 //returns imaginary number "i"
toString( has less limitations than the eval( command. It can handle lists, matrices, and complex numbers. Another difference from eval( is that toString( is affected by display mode changes like Fix.
toString( replaces the old number-to-string routine previously used prior to OS 5.2.
Error Conditions
- ERR:DATA TYPE is thrown when the input is a string.
- ERR:NONREAL ANSWERS is thrown when the input is a complex number and your calculator is in REAL mode.
- ERR:SYNTAX is thrown when trying to evaluate a command that doesn't return a value.
Related Commands
Source: parts of this page were written by the following TI|BD contributors: Battlesquid, jonbush, kg583, Michael2_3B, VoxelPrismatic.
History
Calculator | OS Version | Description |
---|---|---|
TI-84+CE | 5.2.0 | Added |