Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!carleton.EDU!LLACROIX From: LLACROIX@carleton.EDU (Les LaCroix) Newsgroups: comp.os.vms Subject: re: LIB$INIT_TIMER Message-ID: <8805291409.AA25532@ucbvax.Berkeley.EDU> Date: 26 May 88 15:14:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 20 In a recent article, Peter Scott (pjs%grouch@jpl-mil.jpl.nasa.gov) writes: > 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. Note that the parameter for LIB$INIT_TIMER is passed by reference. In Fortran, an absent parameter is equivalent to %VAL(0). In C: Absent: lib$init_timer( 0 ); /* 0 by value */ Zero: lib$init_timer( &0 ); /* 0 by reference */ Non-zero: lib$init_timer( &x ); /* variable x by reference */ Les LaCroix SPSS Inc., 402 Washington, Northfield MN USA 55057-2027 tel 507/663-1205 lacroix%spssnf@carleton.edu (CSnet) lacroix%spssnf.carleton.edu@relay.cs.net (BITNET)