get_file ( : : FileType : FileName )

Query current text file.

The operator get_file names the current output or input file, respectively. The name of the file indicated at the operator open_file and the type of file ('input', 'output') are used as characterization.


Parameters

FileType (input_control)
string -> string
Type of text file.
Default value: 'output'
List of values: 'input', 'output'

FileName (output_control)
filename.named -> string
Name of text file.


Example
  /* Output of the name of the current input file. */
  get_file(::'input_file':FileName) >
  get_file(::'output_file':OutputName) >
  set_file(::'standard_output','output':) >
  fwrite_string(::['current input file: ',FileName]:) >
  fnew_line(:::) >
  set_file(::OutputName,output:).
  

Result

If the parameters are correct the operator get_file returns the value TRUE. Otherwise an exception is raised.


Possible Predecessors

open_file, set_file


Possible Successors

close_file


See also

set_file, open_file



Copyright © 1996-1997 MVTec Software GmbH