Shop OBEX P1 Docs P2 Docs Learn Events
Two lines (or more) of defined variables? — Parallax Forums

Two lines (or more) of defined variables?

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2008-11-13 23:48 in Propeller 1
Some of my programs make extensive use of variables making my PUB line scroll on forever..

PUB main | variable_one, variable_two, variable_three, variable_four, variable_five, variable_six, variable_seven, ...........

Is it possible to place these on more than one line somehow for easier viewing, etc?

Thanks
OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Getting started with a Propeller Protoboard?
Check out: Introduction to the Proboard & Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS

Comments

  • Mike CookMike Cook Posts: 829
    edited 2008-11-13 23:16
    This should do it.

    PUB main |  variable_one,  {
              } variable_two,  {
              } variable_three,{
              } variable_four, {
              } variable_five, {
              } variable_six,  {
              } variable_seven
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-11-13 23:26
    Nice trick!

    Thanks!
    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • John AbshierJohn Abshier Posts: 1,116
    edited 2008-11-13 23:48
    Even nicer
    PUB main |  variable_one,  { comment describing variable
              } variable_two,  { comment describing variable
              } variable_three,{ comment describing variable
              } variable_four, { comment describing variable
              } variable_five, { comment describing variable
              } variable_six,  { comment describing variable
              } variable_seven ' comment describing variable
    
    

    When I worked for the Army I required a contractor to supply the source code.· Each variable was declared on a separate line.· However, the entire program had no comments.· Later, I met the programmer.· I told him that I declared variables on separate lines and commented the variable.· He said that he did the same.· I showed him a printout of the source code we had been supplied.· His reply is not printable here.· I guess that is why they kept him away from most meetings.

    John Abshier
Sign In or Register to comment.