Shop OBEX P1 Docs P2 Docs Learn Events
Multi-line code/declarations — Parallax Forums

Multi-line code/declarations

ramman345ramman345 Posts: 24
edited 2008-06-04 16:23 in Propeller 1
I know spin is pretty particular about indentation and lines but I wonder if there's anyway to do multi-line coding
ex 1: function

PUB Foo(var_1,
               var_2,
               var_3)



ex 2: DAT block table
DAT
  BigData BYTE 1,1,1,1,1,1,1,1,1,1,
                       2,2,2,2,2,2,2,2,2,2
                      3,3,3,3,3,3,3,3,3,3




I'm really interested in the DAT idea because I have some static data I need to load onto a device at startup.

J

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-04 16:23
    This has been mentioned many times before, but you can use comments to "eat" the end-of-line like
    Here's any kind of line {
    } and this is a continuation of that line.
    


    A DAT table would work like
    DAT byte 1,2,3,4, {
    } 5,6,7,8
    


    You can also just continue the table by adding another BYTE directive like
    DAT byte 1,2,3,4
     byte 5,6,7,8
    
Sign In or Register to comment.