var.recallAt

From Inspired-Lua Wiki
Revision as of 12:58, 7 June 2012 by Adriweb (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


var.recallAt is a function that is part of the Var library.

Recalls a value from a cell of a list or matrix in the symbol table.

This function is optimized to work with numeric values and normally returns a number. If the value of the recalled cell is not numeric, this function returns nil and an error message string.


This has been introduced in TI-Nspire OS 3.2 (Changes).


Syntax

var.recallAt(name, column [,row])

Parameter Type Description
name
string Name of the variable to grab from
column
number 1-based column number of the matrix or list.
row
number (Optional) 1-based row number. row is only required when recalling a value from a matrix.

Example

var.store("mat", {{1,2}, {3,4}}) -- create matrix mat in the symbol table
var.storeAt("mat", 13.3, 1, 1) -- puts the number 13.1 into the field 1,1 of the matrix
val = var.recallAt("mat", 1, 1) -- grab it back in lua

Good to know

Routines var.recallAt and var.storeAt will work with matrices but only if they are created by some other means (var.store) :

See also