>This is probably a dumb question but . . . in VFP is there a way to chain multiple commands on a single line? Something like:
>
>x=4|y=6|x=14
>
>I've never seen this form but several other languages allow it.
No, since ENTER is the end-of-command marker.
But often there are shortcuts, which you may also use to make code more compact (and unreadable).
Here is one:
if x
Function1()
endif
iif(x, Function1(), "")
I sometimes used it when there are many similar groups of commands: if option1 is selected run report1, if option2 is selected run report 2, etc. - but it must be used with care, since the result can be difficult to read. Just as when you chain commands as you were hoping to achieve.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)