PUT$ writes PUT$ writes data to a file
Syntax
PUT$(FileName$, Contents$, [InpVar])
...
- 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$("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
...
Example 2: Running a satellite program
PUT$(), in combination with GET$(), is an alternative for FUNCTION as GET$() returns ALL output in file FileName$ in the form of a single string on the basis of input files.
...
Example 3: Saving an embedded file
The syntax
PUT$("File.ext", "NullString")
...