Shop OBEX P1 Docs P2 Docs Learn Events
Indenting — Parallax Forums

Indenting

Tom WyckoffTom Wyckoff Posts: 26
edited 2007-08-14 17:52 in Propeller 1
I know that "repeat" and similar constructions are controlled by indenting the code that follows, but are commented-out lines part of that or are they ignored?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-13 23:50
    Commented out lines are ignored.

    Basically, the indenting just looks at the starting column of the first "token" which should be some kind of identifier.
    The column number is either the same or different. If different, it's either before (to the left) or after (to the right).
  • Tom WyckoffTom Wyckoff Posts: 26
    edited 2007-08-14 15:34
    Thanks Mike, I did find one line where the indenting was off and it loused up my whole program.
  • Don DDon D Posts: 27
    edited 2007-08-14 17:03
    In the editor, try 'Ctrl I' to turn on the indentation highlights -- I leave in on all the time... This is one of the most useful and innovative feature I have ever seen in a structured programming editor...
  • MightorMightor Posts: 338
    edited 2007-08-14 17:52
    I think SPIN is quite Python-esque in some of its syntax. The only thing I keep messing up is assignment. I am always forgetting the ":". I also always have the CTRL-I thing switched on, it helps when you have comments in between lines of code.

    Gr,
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | Any sufficiently advanced technology is indistinguishable from magic.
Sign In or Register to comment.