next up previous index
Next: System directives Up: Calling sequences Previous: Calling COMIS routines from

XYZ-expressions

COMIS supports a special class of XYZ-expressions. The XYZ-expression uses only the variable names X and/or Y and/or Z, e.g.

      X+Y+Z  or X**2+Z**2  or SIN(Y)**2+COS(Y)**2
An XYZ-expression can be translated by

CALL CSEXPR (XYZexpr,JADDR)

where XYZexpr is an argument of type character, whose contents is an XYZ-expression, JADDR is the address of an XYZ-expression stored in the COMIS internal buffer. The XYZ-expression can be evaluated by

      VAL = CSRJCL(JADDR,NPAR,ARG1,ARG2,ARG3)

using the standard way to call a COMIS real function. If X is omitted in the XYZ-expression then ARG1 must be a dummy argument, if Y is omitted then ARG2 must be a dummy argument, e.g.

  XYZ-expression        can be evaluated by

  SIN(Y)/Y              V = CSRJCL(JADDR,2,dummy,Y)
  X+Z                   V = CSRJCL(JADDR,3,X,dummy,Z)
  Z**2                  V = CSRJCL(JADDR,3,dummy,dummy,Z)
  X**2                  V = CSRJCL(JADDR,1,X)


next up previous index
Next: System directives Up: Calling sequences Previous: Calling COMIS routines from
Back to CERN | IT | ASD | CERN Program Library Home
MG (last mod. 1998-08-19)