Property | Value |
---|---|
Hex Value | $EF98 |
Categories | |
Localizations |
|
eval(
Overview
Returns an evaluated expression as a string with 8 significant digits. The expression must be real.
Comment:CE OS 5.2+
Availability: Token only available from within the Basic editor.
Syntax
eval(expression)
Arguments
Name | Type | Optional |
---|---|---|
expression | expression |
Location
prgm, I/O
, C:eval(
Overview
Returns an evaluated expression as a string with 8 significant digits. The expression must simplify to a real expression.
Comment:CE OS 5.2+
Availability: Token only available from within the Basic editor.
Syntax
eval(expression)
Arguments
Name | Type | Optional |
---|---|---|
expression | expression |
Location
prgm, 6:eval(
Special Category
TI-Innovator™ Hub
Description
The eval( command, given an expression that evaluates to a real number, returns the string representation of that number.
eval(1337 //returns "1337"
eval(2.0-3.0 //returns "‾1"
eval(.0001234 //returns "1.234ᴇ‾4"
eval( has more limitations than the toString( command. It cannot handle lists, matrices, or complex numbers (even when the imaginary part of the complex number is zero). Another difference from toString( is that eval( is unaffected by display mode changes like Fix.
Advanced Uses
Use eval( in conjunction with expr( to evaluate a real expression in a string and return the answer in a string.
3.14->X
eval(expr("2X+3
//returns "9.28"
Error Conditions
- ERR:DATA TYPE is thrown when the expression contains a list, matrix, imaginary number, or string.
- 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, lirtosiast, Michael2_3B.
History
Calculator | OS Version | Description |
---|---|---|
TI-84+CE | 5.2.0 | Added |