1. for: bug or feature? (2 of 2)
>>> copy con fortest2.ex
for i = 1 to 40 do
end for
procedure z()
for j = 4 to 50 do
end for
for i = 1 to 43 do
for j = 25 to 35 do
end for
end for
for i = -1 to -5 by -3 do
end for
? 1/0 -- core dump, it's < 300 statements
end procedure
for i = 3 to 60 do
end for
z()
^Z
1 file(s) copied
>>> ex fortest2
fortest2.ex:13 in procedure z()
attempt to divide by 0
... called from fortest2.ex:19
--> see ex.err
>>> type ex.err
fortest2.ex:13 in procedure z()
attempt to divide by 0
j = 50'2'
i = 43'+'
j = 35'#'
i = -4
... called from fortest2.ex:19
Global & Local Variables
fortest2.ex:
i = 40'('
i = 60'<'
>>> rem ... Why are the loop variables called 'global & local'???
>>> rem ... Why are they called '& local'? Locals are in the proc, no?
>>> rem ... I am using Euphoria 2.0 official public domain release!
>>>
2. Re: for: bug or feature? (2 of 2)
Andy Kurnia writes:
> Why are the loop variables called 'global & local'???
Because in your example they were not declared inside any
procedure/function/type.
> Why are they called '& local'? Locals are in the proc, no?
That's C's terminology.
Euphoria's terminology:
private: declared inside a procedure/function/type
local: visible within one file only
global: (using 'global' keyword) visible in other files too
> Are the last for loop values supposed to be in the dump?
Yes.
The same name will appear multiple times in ex.err when
you use the same name in multiple for-loops.
Regards,
Rob Craig
Rapid Deployment Software
http://members.aol.com/FilesEu/