With this built-in predicate it is possible to read strings from external string resource files. When a Trinc-Prolog program starts all files with the extension .str are loaded by the string resource system. The first argument is an integer that identifies a string in a string resource file. The string identified by the value of the first argument is unified with the second argument.
see also: read_string/3 string resource files
| Examples | |
| read_string(13, S). | reads the string with the ID number 13 of the
current language and unify it with S. S = 'Error while inserting concept' |
| Exceptions | |
| The first argument is a variable | an instantiation_error is thrown |
| The first argument Arg is not an integer | a type_error(integer, Arg) exception is thrown |
| The second argument Arg is not a variable nor an atom | a type_error(atom, Arg) exception is thrown |