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 > Pascal Ansi -iso > Re: Loop variab...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 8 Topic 162 of 213
Post > Topic >>

Re: Loop variables in ISO 7185

by akarl <fusionfive@[EMAIL PROTECTED] > Jun 28, 2005 at 03:15 PM

frank@[EMAIL PROTECTED]
 wrote:
> 2metre <news55@[EMAIL PROTECTED]
> wrote:
>>Can loop variables be VAR parameters?
 >
> No, not even value parameters.
>  
>>eg
>>Does the following code conform to ISO7185?
>>
>>function 1func (var i:integer):integer;
>>begin
>>   if i>0 then
>>   for i:= 0 to 10 do
>>   begin
>>     ...
>>   end;
>>end;
>>
>>function 2func:integer;
>>var a:integer;
>>begin
>>   a:= 1;
>>   2func:= 1func(a);
>>   ...
>>end;
> 
> No, for several reasons:
> 
> - program header missing
 >
> - main program missing

Only a snippet is displayed.

> - function names cannot start with numbers

That's correct.

> - invalid loop counter (see above)

You're probably correct. Can't see why it's not allowed though. In 
Oberon-2 it is.

> - result of first function not assigned

Probably means it is inside the begin ... end block.

> - ... is no valid Pascal statement ;-)

Jesus...
 




 8 Posts in Topic:
Loop variables in ISO 7185
2metre <news55@[EMAIL   2005-06-28 11:33:13 
Re: Loop variables in ISO 7185
frank@[EMAIL PROTECTED]   2005-06-28 14:33:53 
Re: Loop variables in ISO 7185
akarl <fusionfive@[EMA  2005-06-28 15:15:57 
Re: Loop variables in ISO 7185
2metre <news55@[EMAIL   2005-06-28 17:22:03 
Re: Loop variables in ISO 7185
frank@[EMAIL PROTECTED]   2005-06-28 18:41:08 
Re: Loop variables in ISO 7185
2metre <news55@[EMAIL   2005-06-29 11:34:52 
Re: Loop variables in ISO 7185
frank@[EMAIL PROTECTED]   2005-06-29 14:32:18 
Re: Loop variables in ISO 7185
2metre <news55@[EMAIL   2005-06-29 15:49:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Sun Jul 6 1:39:23 CDT 2008.