gm2
[Top][All Lists]
Advanced

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

Issue with constant


From: Runar Tenfjord
Subject: Issue with constant
Date: Sat, 5 Nov 2022 19:07:24 +0100

The following code does not compile:
MODULE test;
FROM libc IMPORT printf;

CONST
    MAXVALUE = 0FFFFFFFFFFFFFFFFH;

VAR
    bigval : LONGCARD;
BEGIN
    bigval := MAX(LONGCARD);
    printf('bigval = %llx\n', bigval); (* Prints 'bigval = fffffffffffffff' *)
    (* Assignment below fails *)
    bigval := MAXVALUE;
    printf('bigval = %llx\n', bigval);
END test.

The constant should be identical to  MAX(LONGCARD) as printed,
so this should probably work.

Best regards
Runar Tenfjord

reply via email to

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