Re: A proposal on scope

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 15 Jul 2001, at 19:06, rforno at tutopia.com wrote:


> 
> Rob:
> I have this proposal for version 2.3:
> Allow declaring variables at the beginning of 'for' and 'while' loops, and
> make them local to these loops.

I'll bet he says the same thing as for "goto": make a separate procedure and 
just call it.

procedure somthin
sequence a -- local
atom b -- local
integer d -- local
-- code
end procedure -- somthin

for loop = 1 to 3 do
 somthin
end for

Which doesn't always work well for program flow control "goto"s, especially 
trying to read it, i am always going *up* in the program listing to find the 
procedures, and not *down* thru it like i'd prefer.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu