GetCell (open)
Retrieve a cell from a record by name
Syntax
// Core function, no LOADLIB necessary
VARIANT FUNCTION GetCell(RECORD rec, STRING cellname)
Parameters
RECORD rec
Record to read
STRING cellname
Name of the cell to look for
Return value
VARIANT
The data in the requested cell
Description
GetCell retrieves a cell from record @italic rec with the name @italic cellname. Cell names are case-insensitive. If the record does not contain a cell with the requested name, a HareScript error is generated. GetCell can be used to retrieve cells with a dynamically generated name.
Examples
// Retrieve ‘file.title’
STRING title := GetCell(file,"title");
// Dynamic generation of a cellname example
STRING cellname := "ti" || "tle";
STRING title := GetCell(file, cellname);