Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: What did you change?

GET$ runs a satellite program and returns the contents of a file

Syntax

GET$(FileName$, Process$, [InpVar])

Arguments

  • FileName$ is a string expression containing the name of a file of which the contents has to be returned. If FileName$ does not contain a path, the file is assumed to be present on the current Quaestor Report directory.
  • Process$ is a name of satellite program to be invoked, e.g. producing FileName$ as output file. If Process$="NullString" or "", no program is started and simply the contents of file FileName$ is returned. If Process$ does not contain a path, the program is assumed to be present on the current Quaestor Applications directory.
  • InpVar is an optional list of parameters or functions. The list may contain one or more PUT$() function calls which writing data to input file(s) required by Process$.

...

Example 1: Retrieving data from a file

Using the relation:

A$ = GET$("DATAFILE.DAT","")

If the file DATAFILE.DAT contains:

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 contain 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 (combination with PUT$)

Let the relation OUTPUT$ be defined by 

OUTPUT$ = GET$("OUTPUT.EPO", "SATTELITE_PROGRAM.EXE", PUT$("INPUT.EPI",INPUT$))

This relation results in the following:

...

Example 3: Executing an embedded file

The relation

A$ = GET$("NullString", "NullString")

Embed a Binary by means of selecting the relation and right click select: "Include Binary in frame...". When A$ is requested, the embedded content is assumed to be an executable file. If the embedded object has the ".EXE" extension, this executable is started without expecting an output file.

...