Any way to break up long lines in SPIN2 & Fastspin?
rogloh
Posts: 6,116
in Propeller 2
In a few places I have some longer source code lines in my driver I'd like to break up.
In C you can make use of a backslash for doing this, is there any way to spread code over multiple lines in Spin2/Fastspin?
In C you can make use of a backslash for doing this, is there any way to spread code over multiple lines in Spin2/Fastspin?

Comments
I think that works for things in CON section anyway...
There was another trick too, but don't remember...
Just tried but the "/*" thing doesn't work in the PUB section. However I tried line wrapping with { ending one line and starting with } on the next line and that did work in Fastspin. It's a slightly weird way to do it, but I guess it might help if it is compatible with official SPIN2 as well.
if (r := writeReg(addr, $555, $AA)) OR (r := writeReg(addr, $2AA, $55)) OR { } (r := writeReg(addr, $555, $80)) OR (r := writeReg(addr, $555, $AA)) OR { } (r := writeReg(addr, $2AA, $55)) OR (r := writeReg(addr, sa, cmd)) return rpub some_method(param1, param2, param3) : result | { } local1, local2, local3