Script functions reference > Script functions in alphabetical order > G > GetSubstKeyCount

GetSubstKeyCount
Syntax
GetSubstKeyCount(tbl_file);
tbl_file
Description
Returns the number of entries in a substitution table.
Returns
The number of entries in the substitution table specified by tbl_file.
Example
In this example, the following substitution table (author.tbl) is used.
//!CodePage UTF8!
//!multicolumn!
agatha christie  1890
alfred hitchcock 1899
The following script returns the number of entries in author.tbl:
$numRow = GetSubstKeyCount("../data/tables/author.tbl");
When the script is run, the variable $numRow gets the value 2.
Notes
For backwards compatibility, Subst and SubstArr do not remember comments made in the substitution file. If you want WriteSubst to keep your comments, call GetSubst before any other substitution function accesses the substitution file.
OpenText StreamServe 5.6 Updated: 2013-03-01