PUT$ writes data to a file
Syntax
PUT$(FileName$, Contents$, [InpVar])
Arguments
- FileName$ is a string expression containing the name of a file to which the contents of string Contents$ has to be written. If FileName$ does not contain a path, the file is assumed to be present on the current Quaestor Report directory.
- Contents$ is a string or document that has to be written to file FileName$. For Contents$, the TEMPLATE$ function can be used to create an arbitrarily formatted set of data, i.e. non-Telitab input files.
- InpVar is an optional list of parameters or functions. The list has to contain the parameters, used by the function TEMPLATE$() if that is used as Contents$.
...
- The PUT$ function can be used to export data from a string into an input file for a satellite program. This can be used, in combination with TEMPLATE$() and the GET$() function, to run a satellite program.
...
Example 1: Exporting data
Using the function:
A$ = PUT$UT$("INPUT.EPI",INPUT$INPUT$)
If the string INPUT$ INPUT$ contains the TeLiTab:0
2 "XC" "YC"
"1" 1 1
"2" 2 4
"3" 3 9
"4" 4 16
"5" 5 25
"6" 6 36
"7" 7 49
"8" 8 64
"9" 9 81
"10" 10 100
The string A$ will return the name of the input file: INPUT.EPIAnd And the file INPUT.EPI will contain the TeLiTab:
...
Example 2: Running a satellite program
...
The syntax
PUT$("File.ext", "NullString")
saves an object embedded in the relation containing this function to a file in the current knowledge base project directory (if no path information is included in the file name).
Quick links: Function overview | Attribute overview | Constants overview | Dimensions overview