Article View: comp.lang.modula2
Article #3401help on longcard
From: Steve Perry
Date: Wed, 20 Mar 1996 23:54
Date: Wed, 20 Mar 1996 23:54
25 lines
1650 bytes
1650 bytes
I am seeking help solving a problem, I will at the outset own up to it being a homework-help problem, but would add that the answer to this does represent only a *very* small part of the task that I have to complete! Using FST Modula-2 I need to write, as a small part of an assignment, a timer that takes as a starting point the number of seconds that have elapsed since midnight. This would entail storing a value <= 86400. The GetTime procedure returns CARDINAL values for - minutes since midnight and milliseconds past the minute. I intended to use the following: MyTime := GetTime((SysTime.minutes)*60)+(SysTime.millisec)/1000)); However the result produced can be a value that requires a LONGCARD for storage. I have to date not been able to get the result into a VAR declared AS LONGCARD. I have tried LONG(..) to no avail. Have I missed something basic? A CARDINAL is stored in 2 bytes and a LONGCARD in 4 bytes so why is there not a procedure to convert? My tutor for this subject is not available for several days, none of my text books offer an answer, so any help would be much appreciated. regards -- Steve Perry email steve@suko.demon.co.uk fax By voice first please
Technical Details
Message-ID:
<vCnhuFASrJUxEwoQ@suko.demon.co.uk>Path:
arc1-ca.pugleaf.net!suko.demon.co.uk!steveShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!suko.demon.co.uk!steve From: Steve Perry <steve@suko.demon.co.uk> Newsgroups: comp.lang.modula2 Subject: help on longcard Date: Wed, 20 Mar 1996 23:54:58 +0000 Organization: Dis-Organisation Ltd! Distribution: world Message-ID: <vCnhuFASrJUxEwoQ@suko.demon.co.uk> NNTP-Posting-Host: suko.demon.co.uk X-NNTP-Posting-Host: suko.demon.co.uk MIME-Version: 1.0 X-Newsreader: Turnpike Version 1.10 <m2o0BXAeA6CMESIrvWZtybtPdn>