HPlogo Accessing Files Programmer's Guide > Chapter 3 Specifying a File Designation

Using Command Interpreter Variables and Expressions Within File Designators

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 6 ♥
E0692 Edition 5

Your file reference may also contain command interpreter variables and expressions that are evaluated before the file reference is parsed and validated. In the following file equation, the exclamation point (!) instructs MPE/iX to substitute the variable name MYFILE with the actual file designator assigned to that variable by the SETVAR command.

  SETVAR MYFILE,'FILE2.MYGROUP.MYACCT'
  FILE FILE1=!MYFILE

The HPFOPEN and FOPEN intrinsics also allow you to embed command interpreter variables and expressions in the file reference. The following file references are valid when passed as formal designators:

  !MYFILE
  !MYFILE.!HPGROUP.!HPACCT
  !FILE1/![FINFO(-!FILE1",33)]

For more information about using command interpreter variables and expressions, refer to the Command Interpreter Access and Variables Programmers' Guide.




System-Defined Files


Parsing and Validating File Designators