Script functions reference > Script functions in alphabetical order > R > ReadSubst

ReadSubst
Syntax
ReadSubst(tbl_file);
tbl_file 
Description
Re-reads a substitution table from disk. The substitution table is re-read only if the physical file has been changed since it was last read to memory.
Returns
0
1
-1
Example
In this example, the following substitution table (author.tbl) is used.
//!CodePage UTF8!
//!multicolumn!
agatha christie  1890
alfred hitchcock 1899
In the following script, ReadSubst is used to determine whether author.tbl has changed. If it has, $test will be set to 1, and $nameSur will be set to christie.
If the table is not change, $test will be set to 0, and $nameSur will be set to an empty string.
if (preproc() = 0)
{
$test = ReadSubst("../data/tables/author.tbl");
  if (Num($test) = 1)
  {
$nameSur = Subst("../data/tables/author.tbl", "agatha");
  }
}
Notes
OpenText StreamServe 5.6 Updated: 2013-03-01