Talk About Network



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 > Pascal Ansi -iso > Re: working aro...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 7 Topic 139 of 211
Post > Topic >>

Re: working around anonymous enum

by John Reagan <john.reagan@[EMAIL PROTECTED] > Feb 17, 2005 at 10:59 PM

Marco van de Voort wrote:
> On 2005-02-17, John Reagan <john.reagan@[EMAIL PROTECTED]
> wrote:
> 
>>Marco van de Voort wrote:
>>
>>>How (and if so, for what types) is low() and high() defined in ISO
Pascal
>>>(old and extended) ?
>>>
>>
>>There is no low() or high() in either Extended Pascal or unextended
Pascal.
> 
> 
> I assume this short answer means there is not something corresponding
either
> (e.g. M2 calls it min() and max())?
> 

Correct. There are no standard routines for determining the lower or 
upper bounds of any type, ordinal or otherwise.

Most compilers do have extensions (my compiler spells them UPPER and 
LOWER), but there is absolutely nothing in the standard.

As a point of comparison, here is what my compiler does:

program foo(output);

type e = (one,two,three);
      s = set of e;

begin
writeln(lower(e),upper(e));
writeln(lower(s),upper(s));
end.

(hiyall)$ pascal s
(hiyall)$ link s
(hiyall)$ run s
    ONE THREE
    ONE THREE

-- 
John Reagan
HP Pascal/{A|I}MACRO for OpenVMS Project Leader
Hewlett-Packard Company




 7 Posts in Topic:
working around anonymous enum
Marco van de Voort <ma  2005-02-17 07:43:06 
Re: working around anonymous enum
John Reagan <john.reag  2005-02-17 16:44:23 
Re: working around anonymous enum
Marco van de Voort <ma  2005-02-17 20:26:14 
Re: working around anonymous enum
John Reagan <john.reag  2005-02-17 22:59:16 
Re: working around anonymous enum
Marco van de Voort <ma  2005-02-18 09:19:28 
Re: working around anonymous enum
Hanford Carr <"ha  2005-02-17 22:14:26 
Re: working around anonymous enum
Marco van de Voort <ma  2005-02-18 09:15:05 

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 May 17 1:00:47 CDT 2008.