Path: utzoo!attcan!uunet!lll-winken!lll-lcc!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!VENUS.YCC.YALE.EDU!LEICHTER From: LEICHTER@VENUS.YCC.YALE.EDU ("Jerry Leichter ", LEICHTER-JERRY@CS.YALE.EDU) Newsgroups: comp.os.vms Subject: re: LIB$INIT_TIMER Message-ID: <8805260828.AA19768@ucbvax.Berkeley.EDU> Date: 24 May 88 16:25:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 24 The documentation for LIB$INIT_TIMER states that it takes different actions base on whether the argument handle-adr is absent, zero, or non-zero. How do you get the "absent" effect when calling from C? I have invariably found that I have to specify a 0 explicitly as a parameter when calling system routines where if I were using FORTRAN I would leave the argument blank. LIB$INIT_TIMER takes one argument, handle-adr; it is passed by reference. An optional argument may be omitted by passing 0 by value; or, if it is a trailing argument, by omitting it entirely. (The latter method won't work for system services, but will work for RTL calls.) So: char *cb = 0; /* Control block address */ LIB$INIT_TIMER(&cb); /* Allocate control block, set cb */ LIB$INIT_TIMER(&cb); /* Re-use allocated control block */ LIB$INIT_TIMER(0); /* Use static control block */ LIB$INIT_TIMER(); /* The same thing */ -- Jerry