You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 34 Next »

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$.

Remarks

  1. 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.

Examples

Example 1: Exporting data

Using the function:

A$ = UT$("INPUT.EPI",INPUT$)

If the string INPUT$ contains the TeLiTab:

The string A$ will return the name of the input file:  

And the file INPUT.EPI will contain the TeLiTab:

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.

An example can be found in the description of the function GET$().

Example 3: Saving an embedded file

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: Functions overview | Attribute overview | Constants overview | Dimensions overview

 

  • No labels