Previous: RTL Calling Conventions Up: RTL Calling Conventions Next: No Optional Arguments

Terminator

The most immediately obvious change in the RTL calling sequence is the addition of an argument list terminator for keyword-value routines. There are two basic types of RTL routines: those that take a constant number of arguments, and those that take optional arguments of the form ``keyword'',``value'', ``keyword'',``value'', etc. The terminator applies only to the keyword-value routines. All routines that accept keyword-value pairs, whether or not the pairs are used in any particular call, must have the terminator. The terminator is a language-dependent argument that goes at the end of the argument list, where the next keyword would be if it existed.

In Fortran, the terminator is a single blank in quotes at the end of the argument list:


      call xvopen(unit, status, 'op', 'write', 'open_act', 'sa', ' ')
      call xvread(unit, buffer, status, 'line', 1, ' ')
      call xvclose(unit, status, ' ')

Note that x/ zvclose requires a terminator, since it allows a (seldom-used) keyword-value pair. Since the routine allows keyword-value pairs, it must have a terminator, even though the keyword-value pairs are not used in this particular call.

In C, the terminator is a 0 or NULL argument ( not a blank):


status = zvopen(unit, "op", "write", "open_act", "sa", 0);
status = zvread(unit, buffer, "line", 1, 0);
status = zvclose(unit, 0);

rgd059@ipl.jpl.nasa.gov