GetField |
Databases | |
Aptilis 1 |
GetField(Record, Index)
GetField will isolate a field in a database record.
Databases are loaded with
loadDatabase
or are made up of records put in arrays with
makeRecord.
Records can also be found with functions like
getrecordindexbykey and
getrecordindexbynearkey.
You can also load all the fields of a record in one go into
an array with getAllFields.
Return value:
The field requested, or an empty string if the index goes beyond
the number of fields available.
Example:
r = makeRecord("zero","one","two","three") $ print(getfield(r$, 1)$)Result:
one |
A database: