Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Modula 2 > Re: ISO Open Ar...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 7 Topic 331 of 382
Post > Topic >>

Re: ISO Open Array Parameters

by Keith Hopper <asgard@[EMAIL PROTECTED] > Apr 12, 2007 at 10:09 AM

In article <461B5214.1214.0092.0@[EMAIL PROTECTED]
>,
   Tom Breeden <tmb@[EMAIL PROTECTED]
> wrote:

> Hi all,

> I've just noticed that ISO M2 specifies that it is never allowed to
assign
> to an open array parameter as a whole
> while within the called procedure.

     This was the subject of some considerable debate in the WG meetings,
but the reason given was that in order to assign to such an array it must
be known statically that the argument has enough space. If it hasn't the
only option is to abort the assignment - which is not in the spirit of
Modula-2 since it requires run-time checks.

     The alternative is to create space 'magically' without the programmer
specifically allocating storage - another no-no in an M2 environment.

     The philosophy of Modula-2 is that it is a language in which nothing
happens under the covers - everything should be explicitly written by the
program/module author.

     There is, therefore, nothing wrong per se in making such assignment -
it is after all done in other languages - but cannot be done in a 'Modula
2
way' - hence is not permitted in the standard.

     There was some initial grumbling, but this rationale seems to retain
the intention of Wirth when originally designing the language suitable for
low-level system software as well as for higher level programs.

                         Keith

-- 
Inspired!
 




 7 Posts in Topic:
ISO Open Array Parameters
"Tom Breeden" &  2007-04-10 09:00:05 
Re: ISO Open Array Parameters
"Chris Burrows"  2007-04-10 23:29:51 
Re: ISO Open Array Parameters
Martin Whitaker <spamt  2007-04-10 20:33:25 
Re: ISO Open Array Parameters
Keith Hopper <asgard@[  2007-04-12 10:09:09 
Re: ISO Open Array Parameters
"Tom Breeden" &  2007-04-15 13:27:41 
Re: ISO Open Array Parameters
Martin Whitaker <spamt  2007-04-15 22:35:57 
Re: ISO Open Array Parameters
"Tom Breeden" &  2007-04-16 12:29:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 2:11:16 CDT 2008.