gm2
[Top][All Lists]
Advanced

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

Re: gm2 rejecting a constant statement as variable


From: Alice Osako
Subject: Re: gm2 rejecting a constant statement as variable
Date: Mon, 1 Apr 2024 14:32:26 -0400
User-agent: Mozilla Thunderbird

Gaius Mulley:
Gaius Mulley:

I've fixed this locally:

$ gm2 constbool2.mod 
constbool2.mod:8:36: error: In program module ‘constbool2’: the procedure function ‘ORD’ is being called from within a constant _expression_ and therefore the parameter must be a constant, seen _expression_
    8 |    BitsInUse = ORD(AddressableBits > MaxBits) * MaxBits + ORD(AddressableBits <= MaxBits) * AddressableBits;
      |                    ~~~~~~~~~~~~~~~~^~~~~~~~~

but I've seen this fix needs to be applied to most of the standard
procedure functions.  Once this is done and passes the regression tests
I'll push the git changes
the checking of constant parameters to standard procedure functions
(when used in a const _expression_) is now implemented and has been git
pushed,

Excellent, I'll see to trying it as soon as I build the new version.

reply via email to

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