Quote: "Isn't if a then b then c then d more legible than if a then b : c : d?"
I don't know, multiple 'then' feels more like an elseif structure to me.
Also, rather than mixing then and : together, I would do
if a : b : c : d : endif
it's cleaner and also more compressed, which is the main point of putting it all on one line right?
Personally, I prefer to avoid then in general and ususally try to avoid cramming multiple commands on one line, though there are exceptions like some select/cases
It's interesting how different everyone's personal habits are, and how they formed.
`for If's which do a single command or function call, I'd do then:
if a then doSomething()
`for If's which do multiple things, or set any sort of variable, I'll break it to multiple lines:
if a
b = a
endif
if a
b = a
doSomething(b)
endif
`for selects where a case result will only do one thing I'll stick them to one line:
select a
case 1 : doSomething() : endcase
case 2 : doSomethingElse() : endcase
case 3 : doThis() : endcase
case 4 : doThat() : endcase
endselect
`though selects where case will do multiple things I break it down again with spacing between for readability:
select a
case 1
b = a
doSomething(b)
endcase
case 2
b = a + c
doSomethingElse(b)
endcase
endselect