Article View: comp.lang.modula2
Article #3324Re: An ISO Standard Question
From: Alex Nedorya
Date: Wed, 28 Feb 1996 20:52
Date: Wed, 28 Feb 1996 20:52
46 lines
1688 bytes
1688 bytes
gstark@ifs.org.uk wrote:
>
> Dear All,
>
> I wonder if someone out there could clarify something
> in the ISO standard.
>
> Using one of the two "ISO Compliant" compilers we've tested (XDS), this is legal:
>
> TYPE
> Str = ARRAY[1 .. 10] OF CHAR;
> StrArr = ARRAY[1 .. 2] OF Str;
> VAR
> s : StrArr;
> BEGIN
> s := StrArr{"Hello" , "Mum" };
>
> ... but this is *illegal*:
>
> TYPE
> Str = ARRAY[1 .. 10] OF CHAR;
> StrArr = ARRAY[1 .. 2] OF Str;
> CONST
> s = StrArr{"Hello" , "Mum"};
The XDS translator reports "Can not generate object declaration" error
in the second case.
It does not have any connection with ISO standard. It is just a
restriction in the code
generator which generates C code. Both texts are valid accorording to
the standard.
BTW, Native XDS (which generates native code for Win95/WinNT)
compiles both texts without problems.
I cannot say now why this structure constant is not generated by our
translator,
I'll have a look.
BTW, new XDS web pages are available as
http://www.iis.nsk.su/xtech/xds/
and will be available soon as
http://www.dct.com/~johnm/xds.html
-- Alex Nedorya, xTech Ltd
Technical Details
Message-ID:
<31570790.4D66@iis.nsk.su>Path:
arc1-ca.pugleaf.net!news.scnet.nsk.su!usenetReferences:
<1996Feb27.135653.53493@ucl.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.scnet.nsk.su!usenet From: Alex Nedorya <ned@iis.nsk.su> Newsgroups: comp.lang.modula2 Subject: Re: An ISO Standard Question Date: Thu, 29 Feb 1996 20:52:32 +2400 Organization: Scientific Centre Network Message-ID: <31570790.4D66@iis.nsk.su> References: <1996Feb27.135653.53493@ucl.ac.uk> NNTP-Posting-Host: xc97.iis.nsk.su Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.0 (Win95; I) CC: ned@iis.nsk.su