Shop OBEX P1 Docs P2 Docs Learn Events
I have one of those stupid questions — Parallax Forums

I have one of those stupid questions

idbruceidbruce Posts: 6,197
edited 2010-12-30 08:14 in Propeller 1
Hello Everyone

I once knew the answer to this, but I am getting senile in my old age :smile:

What is the proper way to extend a function with numerous parameters to two lines instead of just one?

Thank you so kindly.:smile:

LOL I even made a mistake in the title

Bruce

Comments

  • W9GFOW9GFO Posts: 4,010
    edited 2010-12-30 06:32
    Do it like this:
    code code code code code code {
    } the rest of the code
    

    Rich H
  • idbruceidbruce Posts: 6,197
    edited 2010-12-30 07:21
    W9GF0

    I thought it was something more like this. Will this work?
    PUB LengthyFunction((Parameter1, Parameter2, Parameter3, Parameter4, Parameter5)
         (Parameter6, Parameter7))
    
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-12-30 08:07
    Bruce,

    I think W9GFO's method is correct. Those brackets { }'s effectively "comment out" the unseen carriage return so you can continue typing a single line of code from one editor line to the next. In fact you can type a line of program code onto a multiple of editor lines that way.
  • idbruceidbruce Posts: 6,197
    edited 2010-12-30 08:14
    Thanks Rich and ElectricAye

    I think that is a huge mistake within the Propeller Tool. The function should begin with the first "(" and end with the last ")", irregardless of how many lines it takes to write the function.

    Bruce
Sign In or Register to comment.