Document: present Purpose: Describes the use of undefined arguments in subroutine and function calls. Category: UTILITY File: present.c Author: K.G. Begeman Description: To avoid the so called comma-comma construct which is accepted by some (not ALL) fortran compilers, the PRESENTN and PRESENTC routines were developped. These routines check the address of the argument against the address of a variable in a certain common block in the calling routine. If the addresses are equal, i.e. the value in the common block is passed as an argument to the procedure, the argument is called undefined (the same thing would be achieved by leaving out the argument when the compiler accepts the comma-comma construct). The common blocks reserved for this solution are common /NOARGN/ for numeric variables and common /NOARGC/ for character variables. C programmers can use the 'standard' method of putting the NULL pointer in the argument list for numeric arguments or a (fchar) character string with address NULL for character arguments. The routines PRESENTN and PRESENTC return false if the numeric or character argument is the first item in resp. common /NOARGN/ or common /NOARGC/, otherwise true is returned. Each of these routines is described in more detail in their DC2 documents. Warning: System dependent! At the moment it works on VMS, SUN, CONVEX, HP 9000, SONY, DECstations, ALLIANT, ALPHA, CRAY systems. Updates: Jul 30, 1989: KGB, original document. Apr 23, 1991: KGB, implemented for HP. Sep 22, 1994: KGB, implemented for CRAY.