gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] WriteCard and SYSTEM.CARDINAL8


From: Martin Kalbfuß
Subject: [Gm2] WriteCard and SYSTEM.CARDINAL8
Date: Tue, 15 Dec 2009 22:00:58 +0100

Hi,

I have the following procedure and record

Version = RECORD
        major : SYSTEM.CARDINAL8;
        minor : SYSTEM.CARDINAL8;
        patch : SYSTEM.CARDINAL8;
END;

PROCEDURE LinkedSKVersion(): Version;
VAR version : Version;
BEGIN
          version.major := SK_MAJOR;
          version.minor := SK_MINOR;
          version.patch := SK_PATCH;     
RETURN version;
END LinkedSKVersion;

I wrote an example to test this procedure:

MODULE version;

IMPORT SKGeneral;
IMPORT STextIO;
IMPORT SWholeIO;

VAR SKVersion : SKGeneral.Version;
BEGIN
     SKVersion := SKGeneral.LinkedSKVersion(); 
     
     STextIO.WriteString('SK version is: ');
     SWholeIO.WriteCard(SKVersion.major, 1);
     STextIO.WriteString('.');
     SWholeIO.WriteCard(SKVersion.minor, 1);
     STextIO.WriteString('.');
     SWholeIO.WriteCard(SKVersion.patch, 1);
     STextIO.WriteLn();

END version.


I get 

SK version is: 134654208.134654209.134654208

Definitely not the version number. Can't I write CARDINAL8 with
WriteCard?

I checked SK_MAJOR, SK_MINOR, SK_PATCH. They are correct.

Thanks,


-- 
Martin Kalbfuß <address@hidden>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]