Announcement

Collapse
No announcement yet.

Request for possible added calling parameters in New PB for DOS?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lance Edmonds
    replied
    Both pseudocode example are "valid" (if pseudocode can be valid!), since they both receive no more than 16 <U>parameters</U>.

    To be clear, this has nothing to do with shared and/or local variables... they are a completely different topic.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Mel Bishop
    replied
    Originally posted by Lance Edmonds:
    ...PB/DOS currently supports up to 16 parameters per Sub/Function...
    Okay, I have never had the necessity to test this Lance. Which
    one of the two examples are valid:

    Function DoSomething(p1...p16)
    shared q1...q16
    process
    process
    end function

    Function DoSomething(p1...p8)
    shared q1...q8
    process
    process
    end function


    ------------------

    Leave a comment:


  • Ian Cairns
    replied
    The parameter passing limitation of 16 variables is not really a roadblock to the passing of information, since you can pass as many as you like in a UDT, or in a string variable (for pre-UDT versions) which you can parse to extract "user-packed" information.
    (Note: this is just posted for the lurkers, not the informed.)
    regards,

    ------------------
    [email protected]

    Leave a comment:


  • Lance Edmonds
    replied
    Extending PB/DOS to support for 32 up to parameters is definitely on the wish list.

    For the lurkers, PB/DOS currently supports up to 16 parameters per Sub/Function, but the latest versions of PB/CC and PB/Win support up to 32 parameters per Sub/Function.



    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Mike Luther
    replied
    No .. not GOSUB at all.

    Issue is one of what's available in MYSUB (Parm1, Parm2 .. etc.),
    which you CALL from the program ..

    Looking over the entire exposure to PB 3.5 for all these years and
    over 1,300,000 lines of source in the suite, the worst SUB uses 59
    parameters. A number of them use more than 16. Most do not.

    I don't claim that the request will be efficient, just nice if it
    could be worked out, that's all.


    ------------------
    Mike Luther
    [email protected]

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Do I read the post above correctly that a LIMIT is in place that
    allows only 16 CALL SUBS exists - how about "gosub ... and return"
    is that limited ?

    Every so often I seem to be caught up in a ERROR calling but not gosub.

    Jim



    ------------------

    Leave a comment:


  • Request for possible added calling parameters in New PB for DOS?

    Is it too much to ask for more than sixteen calling parameters in the
    next version of PB for DOS for CALLS and SUBS and so on?

    Yes, I realize that SPEED is all important! Yes I realize that the
    added number of them imposes other penalties as the total possible
    grows. However, even if I had 32 instead of 16, it would have made
    a whale of a lot less PUBLIC use needed for really complex work.

    Perhaps the code behaves as now for 16 or less, and slower, but still
    can be compiled for 17-32 .. and so on ... up to what, 64?

    Just a thought and wishful thinking ..



    ------------------
    Mike Luther
    [email protected]
Working...
X