gm2
[Top][All Lists]
Advanced

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

Re: [Gm2] GNU M2 compatibility


From: Gaius Mulley
Subject: Re: [Gm2] GNU M2 compatibility
Date: Sat, 08 Jun 2002 11:51:27 +0100

Hi,

Iztok Kobal <address@hidden> writes:

> GNU M2 conforms to which standard : Wirth, ISO or another ?

Currently Wirth (PIM-2) with some extensions.

> I find it very confusing since it doesn't compile things like

> TYPE CharSet = SET OF CHAR;
> VAR b : BOOLEAN;
> VAR ch : CHAR;
> ....
> b := (ch IN CharSet{'A' .. 'Z'};

yes currently the TSIZE(set)=TSIZE(WORD) which is rather limiting if
you want to use SET OF CHAR.  Hopefully this limitation will be removed
this summer.


> DEFINITION MODULE ConvTypes;
> TYPE
>   ConvResults = (strAllRight,strOutOfRange,strWrongFormat,strEmpty);
>   ScanClass = (padding,valid,invalid,terminator);
>   ScanState = PROCEDURE (CHAR, VAR ScanClass, VAR ScanState);
> END ConvTypes.
> 
> IMPLEMENTATION MODULE ConvTypes;
> END ConvTypes.

> here the compiler reports nothing and executes endless loop.

yes thanks - you've spotted a bug. The compiler is trying to resolve a
procedure type which has a parameter of the same type..
Hopefully I'll get a fix for this soon. incidentally are you sure
that the code shouldn't be:

   ScanState = PROCEDURE (CHAR, VAR ScanClass, VAR ConvResults);

?

but still, gm2 is in error - the bug fix shouldn't be that difficult.

hope this helps,

Gaius




reply via email to

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