Spinroot

A forum for Spin users

You are not logged in.

#1 2019-03-19 15:25:19

marc15
Member
Registered: 2019-02-07
Posts: 34

semicolon vs arrow

the manual states
"The two statement separators are equivalent."
http://spinroot.com/spin/Man/Manual.html

is there really no exception? I ask because I'd like to prefer ; but I don't want to write a wrong recommendation :-)
So I can say, "->" can always be replaced by ";"?

http://spinroot.com/fluxbb/viewtopic.php?id=857
was read

Offline

#2 2019-03-19 17:18:07

spinroot
forum
Registered: 2010-11-18
Posts: 695
Website

Re: semicolon vs arrow

that is correct.
sometimes it looks cleaner if you separate a wait-condition from the following text with the arrow, e.g.:
if
:: (a > b) -> a++
:: else -> a--
fi
but it is entirely optional, and anywhere you can use -> you can also use ; instead

Offline

#3 2019-03-19 21:23:29

marc15
Member
Registered: 2019-02-07
Posts: 34

Re: semicolon vs arrow

Thank you very much!!

Offline

Board footer

Powered by FluxBB