Current Help System: Tutor Translator (View Core Help)

### Output to File

OPEN (”FILENAME.MEA”)
OPEN 1 (”FILENAME.MEA”) translates to à

=CALLSUB/TUTOR_OPEN,TUTORSUB.PRG: E.OFMT,1,"FILENAME.MEA",,
OPEN 2 (”FILENAME.MEA”)
OPEN 3 (”FILENAME.MEA”)
OPEN 4 (”FILENAME.MEA”)

The above commands are translated like the ”OPEN 1” example with the corresponding file number changed.

FILE

FILE 1 translates to è

=CALLSUB/TUTOR_DEV_ENDIS,TutorSub.PRG: E.OFMT,4,1,,

FILE 2, FILE 3 & FILE 4 are translated like the ”FILE 1” example with the corresponding file number changed.

NOFILE

NOFILE 1 translates to è

=CALLSUB/TUTOR_DEV_ENDIS,TutorSub.PRG: E.OFMT,4,0,,

NOFILE 2, NOFILE 3, & NOFILE 4 are translated like the ”NOFILE 1” example with the corresponding file number changed.

The FILE (Varlist) command is translated as an assignment command in which all the variables in the varlist are converted to string and concatenated to the other variable types (if any). The resulting string (FILE_STRING) is passed to the Tutor_FILE subroutine that emulates the FILE output.

The conversion rules are the same for DY commands:

FILE (”THIS IS A STRING”)

FILE 1 (”THIS IS A STRING”) translates to è

ASSIGN/FILE_STRING = " THIS IS A STRING"
=CALLSUB/TUTOR_FILE,TutorSub.PRG: E.OFMT, FILE_STRING,1,,

FILE 2(”THIS IS A STRING”)
FILE 3(”THIS IS A STRING”)
FILE 4(”THIS IS A STRING”)

The above commands are translated like the ”FILE 1” example with the corresponding file number changed.

FILE (INT_VAR)

FILE 1 (INT_VAR) translates to è

ASSIGN/FILE_STRING = FORMAT(”%d”, E.INT_VAR)
=CALLSUB/TUTOR_FILE,TutorSub.PRG: E.OFMT, FILE_STRING,1,,

FILE 2(INT_VAR)
FILE 3(INT_VAR)
FILE 4(INT_VAR)

The above commands are translated like the ”FILE 1” example with the corresponding file number changed.

FILE (REAL_VAR)

FILE 1 (REAL_VAR) translates to è

ASSIGN/FILE_STRING = FORMAT(”%f”, E.REAL_VAR)
=CALLSUB/TUTOR_FILE,TutorSub.PRG: E.OFMT, FILE_STRING,1,,

FILE 2(REAL_VAR)
FILE 3(REAL_VAR)
FILE 4(REAL_VAR)

The above commands are translated like the ”FILE 1” example with the corresponding file number changed.

FILE (VECT_VAR)

FILE 1 (VECT_VAR) translates to è

ASSIGN/FILE_STRING = FORMAT(”%f %f %f”, E.VECT_VAR)
=CALLSUB/TUTOR_FILE,TutorSub.PRG: E.OFMT, FILE_STRING,1,,

FILE 2(VECT_VAR)
FILE 3(VECT_VAR) FILE 4(VECT_VAR)

The above commands are translated like the ”FILE 1” example with the corresponding file number changed.

The commands with COORDINATE variables are translated in the same way as Vector variables.

FILE (BOOL_VAR)

FILE 1 (BOOL_VAR) translates to è

ASSIGN/FILE_STRING = E.BOOLVAL(E.BOOL_VAR) translates to
=CALLSUB/TUTOR_FILE,TutorSub.PRG: E.OFMT, FILE_STRING,,

FILE 2(BOOL_VAR)
FILE 3(BOOL_VAR)
FILE 4(BOOL_VAR)

The above commands are translated like the ”FILE 1” example with the corresponding file number changed.

FILE (”INT VAR = ” , INT_VAR,”; REAL VAR = ”,REAL_VAR,”; VECT VAR = ”,VECT_VAR )

FILE 1 (”INT VAR = ” , INT_VAR,”; REAL VAR = ”,REAL_VAR,”; VECT VAR = ”,VECT_VAR ) translates to à

ASSIGN/FILE_STRING = "INT_VAR = " + E.INT_VAR + "; REAL_VAR = " + FORMAT("%f", E.REAL_VAR) + "; VECT_VAR = " + FORMAT("%f %f %f", E.VECT_VAR) =CALLSUB/TUTOR_FILE,TutorSub.PRG: E.OFMT, FILE_STRING,1,,

Where the values are defined as:

- INT_VAR is a variable of type integer.

- REAL_VAR is a variable of type Real.

- VECT_VAR is a variable of type Vector.

FILE 2(BOOL_VAR)
FILE 3(BOOL_VAR)
FILE 4(BOOL_VAR)

The above commands are translated like the ”FILE 1” example with the corresponding file number changed.

CLOSE

CLOSE 1 translates to è

=CALLSUB/TUTOR_CLOSE,TUTORSUB.PRG: E.OFMT,1,,

CLOSE 2, CLOSE 3 & CLOSE 4 are translated like the ”CLOSE 1” example with the corresponding file number changed.