Current Help System: Tutor Translator (View Core Help)

### Output to Screen

The DY (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 (DY_STRING) is passed to the Tutor_dy subroutine that emulates the DY output.

DY translates to è

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

NODY translates to è

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

The conversion rules are:

- String : No conversion.
  ASSIGN/DY_STRING = E.STRING_VAR
  or
  ASSIGN/DY_STRING = ”STRING”

- Integer : Use the FORMAT function:
  ASSIGN/DY_STRING = FORMAT(”r;%d”, E.INT_VAR);
  or
  ASSIGN/DY_STRING = ”10”

- Real: Use the FORMAT function:
  ASSIGN/DY_STRING = FORMAT(”r;%f”, E.REAL_VAR);
  or
  ASSIGN/DY_STRING = ”10.04”

- Vector and Coord: Use the FORMAT function:
  ASSIGN/DY_STRING = FORMAT("%f %f %f”, E.VECT_VAR)

- Boolean: Use the BOOLVAL function:
  ASSIGN/DY_STRING = E.BOOLVAL (E.BOOL_VAR)

The BOOLVAL function is defined as:

ASSIGN/ E.BOOLVAL = FUNCTION((BVAL),IF(BVAL<>0,"TRUE","FALSE"))

DY (”r;THIS IS A STRING”) translates to è

ASSIGN/DY_STRING = " THIS IS A STRING"
=CALLSUB/TUTOR_DY,TutorSub.PRG: E.OFMT, DY_STRING,,

DY (INT_VAR) translates to è

ASSIGN/DY_STRING = FORMAT(”r;%d”, E.INT_VAR)
=CALLSUB/TUTOR_DY,TutorSub.PRG: E.OFMT, DY_STRING,,

DY (REAL_VAR) translates to è

ASSIGN/DY_STRING = FORMAT(”r;%f”, E.REAL_VAR)
=CALLSUB/TUTOR_DY,TutorSub.PRG: E.OFMT, DY_STRING,,

DY (VECT_VAR) translates to è

ASSIGN/DY_STRING = FORMAT(”r;%f %f %f”, E.VECT_VAR)
=CALLSUB/TUTOR_DY,TutorSub.PRG: E.OFMT, DY_STRING,,

The same for Coordinate variables

DY (BOOL_VAR) translates to è

ASSIGN/DY_STRING = E.BOOLVAL(E.BOOL_VAR)
=CALLSUB/TUTOR_DY,TutorSub.PRG: E.OFMT, DY_STRING,,

DY (”r;INT VAR = ” , INT_VAR,”; REAL VAR = ”,REAL_VAR,”; VECT VAR = ”,VECT_VAR ) translates to è

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

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.