From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,5c7411e3cf60a1d7 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,5c7411e3cf60a1d7 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-01-05 14:58:10 PST Xref: gmd.de comp.os.vms:38138 comp.sys.dec:12705 Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!nntp-server.caltech.edu!eql.caltech.edu!rankin From: rankin@eql.caltech.edu (Pat Rankin) Newsgroups: comp.os.vms,comp.sys.dec Subject: Re: need help using RTL time functions Followup-To: comp.os.vms Date: 5 Jan 1994 14:22 PDT Organization: California Institute of Technology Distribution: world Message-ID: <5JAN199414225664@eql.caltech.edu> References: NNTP-Posting-Host: eql.caltech.edu News-Software: VAX/VMS VNEWS 1.41x4 In article ,\ ah301@yfn.ysu.edu (Jerry Sy) writes... > I am writing a simple Vax C program to calculate time difference, > but the RTL LIB$ functions does not seem to be returning to me > the correct results. can anybody tell me what I am doing wrong ? [...] > unsigned long qDateA,qDateB,qDateDiff; You can't make a quadword variable by prefixing the name of a longword variable with "q". Change each of those to be arrays of two longs (or four shorts, &c), and change the code which manipulates them to cope with arrays rather than scalars. unsigned long qDateA[2], qDateB[2], qDateDiff[2]; ..lib$sub_times(qDateA, qDateB, qDateDiff); /* note '&'s removed */ Pat Rankin, rankin@eql.caltech.edu