[Top][All Lists]

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

Re: [Gm2] Returning a string constant

From: Gaius Mulley
Subject: Re: [Gm2] Returning a string constant
Date: 27 Oct 2008 21:44:51 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

"Breeden, Thomas (tmb)" <address@hidden> writes:

> BTW, one thing that has puzzled me about the ISO Standard is that it
> states "No direct assignments to open array formal parameters may be
> made" - no ifs, ands, or buts.

> So the, when s is an open array parameter, the
>   s := "test";
> alternative to
>   Assign("test",s);
> should be illegal in an ISO conforming compile mode
> but I am not sure why.
> So far as I can see, either way, if HIGH() is accurate it should be safe,
> and if not, unsafe.

Hi Tom,

yes interesting - I can only guess that it was to ensure that it was
safe and that then the standard wouldn't have to define what should
happen if the const string exceeded HIGH.  I suppose it could raise
another new exception if it were exceeded or would it truncate?  And
the ISO standard becomes a little longer :-).


reply via email to

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