Using END instead of NEXT

132 views
Skip to first unread message

Randy

unread,
Mar 28, 2026, 1:03:57 PM (7 days ago) Mar 28
to harbou...@googlegroups.com
Hi all,

It seems that you can use END instead of NEXT in a FOR loop (at least in
Harbour v1.0.1)...

for i := 1 to 5
    ? i
end   // instead of NEXT

Does anyone know if I can rely on this behavior?

In case you think I am on crack, I need a function to run after every
NEXT so I want to use the pre-processor instead of making these changes
all over the place and I cannot preprocess NEXT to NEXT (since it's
circular) so I wanted to do this...

#command next => end ; SomeFuncHere()

Thanks!

Dan Campbell

unread,
Mar 29, 2026, 5:28:04 PM (6 days ago) Mar 29
to Harbour Users
Hi Randy,

Would it make it easier to use the functional version of For Next, hb_ForNext()?
Reply all
Reply to author
Forward
0 new messages