[Thread Prev][Thread Next][Index]
[ferret_users] IF and REPEAT crash
Dear ferret users,
is the following problem already known?
The last backslash before the endif within the repeat loop causes the
script to crash (test3). This only occurs when the expression on the
outer if is evaluated to zero (here set to zero directly). If it is
evaluated as 1 in test3, everything is executed as intended.
Thanks in advance for clarification.
Regards,
Hella Riede
CODE:
say "test1"
if 0 then
repeat/RANGE=1:2 (if 0 then; say "hello"; endif)
endif
say "test2"
if 0 then
repeat/RANGE=1:2 (\
if 0 then;\
say "hello"; endif)
endif
say "test3"
if 0 then
repeat/RANGE=1:2 (\
if 0 then;\
say "hello";\
endif)
endif
RESULT:
yes? go test.jnl
say "test1"
test1
if 0 then
endif
say "test2"
test2
if 0 then
endif
say "test3"
test3
if 0 then
endif)
endif
**ERROR: invalid command: ENDIF can only be used in an IF clause
endif
Command file, command group, or REPEAT execution aborted
yes?
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement