APL Container Functions

The APL Container functions enable you to manage bundles of data objects according to your specific requirements.

Note!

These functions support only the string data type.

The following functions for APL Container described here are:

romapCreateTableFromFile

The romapCreateTableFromFile function enables you to load a large file to the Execution Context memory, and create a look-up table from it.

The command reads a file and creates a read-only file of key-value data pairs.

any romapCreateTableFromFile ( string fileName , char delimiter , any oldTable )



Parameter

Description

Parameter

Description

fileName

The name of the (input) file that is about to be converted into a look-up table.

Note!

If the romapCreateTableFromFile function reads two different values of the same key, you cannot control nor choose which of the values is registered as the key's value in the table, as every key should be unique.



delimiter

The delimiter character that the (input) file includes

oldTable

The name of the look-up table that has previously been created with this function for the same fileName . May be Null.

Note!

This parameter enables you to increase performance by reusing a table that has already been read. It is especially practical when you only want to add a small amount of data.



Returns

A read-only table that is used in subsequent calls to romapGetValue



romapGetValue

The romapGetValue function enables you to fetch a specific value from a specific table.

string romapGetValue ( any tableObject , string key )



Parameter

Description

Parameter

Description

tableObject

The object that is returned from romapCreateTableFromFile. For further information see the section above, romapCreateTableFromFile.

key

The key for which the function should return the value

Returns

The value of the specified key



romapGetSize

The romapGetSize function returns the size of a specific table.

int romapGetSize( any tableObject )



Parameter

Description

Parameter

Description

tableObject

The object that is returned from romapCreateTableFromFile. For further information see the section above, romapCreateTableFromFile.

Returns

The size of the specified table