Hello!
I am not sure if this is documented, but using {.} seems to work instead of using an end do statement, as in:
do i=1,3 {
dis "i = " i
}
Is this something we can rely upon?
thanks,
Randy
do loop syntax updated??
Re: do loop syntax updated??
} has always been synonymous with END. This appears to work because the { (which is synonymous with BEGIN) at the end of the line gets eaten by the parser. On the other hand,
do i=1,3
{
?i
}
(where the { is on a separate line) doesn't work as the } is closing the {} block and not the do loop.
do i=1,3 {
?i
}
works because { doesn't do anything so } is an END to the DO loop.
do i=1,3
{
?i
}
(where the { is on a separate line) doesn't work as the } is closing the {} block and not the do loop.
do i=1,3 {
?i
}
works because { doesn't do anything so } is an END to the DO loop.