You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FOR i = 1L, 3 DO a = temporary(i) + 1 --> % Variable is undefined: I.
Also, reverted FOREACH code to older, less optimized version as IDL does not complain on constructs such as:
i=findgen(33) & foreach j,i do a=temporary(j) which is possible to reproduce with GDL.
Note that
GDL> i=findgen(33) & foreach j,i do a=temporary(i)
% TEMPORARY: Variable is undefined: I
when
IDL> i=findgen(33) & foreach j,i do a=temporary(i)
IDL> help,a
A FLOAT = Array[33]
This discrepancy existed since GDL's fundation, and getting the IDL behaviour would be complicated, although it may be that TEMPORARY just removes a reference to the variable, in which case loops variables may just need to have their reference number incremented. TBC.
IDL sees the trick 😄
The text was updated successfully, but these errors were encountered: