multi-line code ?
Areal Person
Posts: 197
How do I do multiline code statments ?
I got this DAT block, I'm making a array
COL···· byte··· %1000000000000000, %0100000000000000, %0010000000000000, %0001000000000000,
··············· %0000100000000000, %0000010000000000, %0000001000000000, %0000000100000000,
··············· %0000000010000000, %0000000001000000, %0000000000100000, %0000000000010000,
··············· %0000000000001000, %0000000000000100, %0000000000000010, %0000000000000001,··
But this does not work ?
How do I do it as a multi-line, because 16 across is to much for one line of code.
Thanks,
-Areal
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but
what do you expect ? I'm a programmer.
I got this DAT block, I'm making a array
COL···· byte··· %1000000000000000, %0100000000000000, %0010000000000000, %0001000000000000,
··············· %0000100000000000, %0000010000000000, %0000001000000000, %0000000100000000,
··············· %0000000010000000, %0000000001000000, %0000000000100000, %0000000000010000,
··············· %0000000000001000, %0000000000000100, %0000000000000010, %0000000000000001,··
But this does not work ?
How do I do it as a multi-line, because 16 across is to much for one line of code.
Thanks,
-Areal
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but
what do you expect ? I'm a programmer.
Comments
The binary values you have there are words(16 bit) not bytes. So you'd do this:
COL word %1000000000000000, %0100000000000000, %0010000000000000, %0001000000000000
word %0000100000000000, %0000010000000000, %0000001000000000, %0000000100000000
word %0000000010000000, %0000000001000000, %0000000000100000, %0000000000010000
word %0000000000001000, %0000000000000100, %0000000000000010, %0000000000000001
Or if you really do want bytes, split up the values into 8 bits at a time.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Help to build the Propeller wiki - propeller.wikispaces.com
Prop Room Robotics - my web store for Roomba spare parts in the UK
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Of course, if you did that it may become more apparent that this series is hardly memorable enough to park in an array.
Or more politely, why bother putting these datum into an array when you can calculate it as (or more?)·quickly as you can look it up?
Post Edited (Fred Hawkins) : 11/13/2007 11:00:05 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have a tree growing out of my head, but
what do you expect ? I'm a programmer.