WriteSubst(tbl_file);
tbl_file
Writes a substitution table to a specified path. Any external modifications to the file after it has been loaded are overwritten. See also ReadSubst.
1 0 The following script writes a substitution file to ../data/tables/author.tbl:SetSubst("../data/tables/author.tbl","agatha",0,"christie");
SetSubst("../data/tables/author.tbl","agatha",1,"1890");
SetSubst("../data/tables/author.tbl","alfred",0,"hitchcock");
SetSubst("../data/tables/author.tbl","alfred",1,"1899");WriteSubst("../data/tables/author.tbl");Result (author.tbl):
//!multicolumn!agatha christie 1890alfred hitchcock 1899
• A substitution table is kept in memory until the script function EraseSubst is called for that table.
• 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.
• The column separator in the saved file will always be a tab-character, regardless of an earlier column separator.
• If a column index larger than zero has been set using scripts in a non //!multicolumn! marked file, the file will be converted into multi-column when saved, and key values containing white spaces will be converted adding quotes or <hex> notations if necessary.
• <hex> notations other than <0d><0a><09> are not kept when saving.
• If //!codepage! is specified in the substitution table file, the remaining file will be saved using the given codepage.
• The WriteSubst function will automatically add double quotes ("") around empty columns in the table. This is to make sure that the correct value is returned by the GetSubst function, as this function does not take the column separators into account.
OpenText StreamServe 5.6 | Updated: 2013-03-01 |