Float to Double

Everything else that doesn't fall into one of the other PB categories.
AlGonzalez
User
User
Posts: 53
Joined: Sun Feb 15, 2004 6:04 am
Location: Easley, SC, USA

Post by AlGonzalez »

Code: Select all

Structure DoSomethingParms
    parm1.s
    parm2.l
    parm3.l
    parm4.s
    ; etc.
EndStructure

Procedure.l DoSomething(*parms.DoSomethingParms)
    Debug *parms\parm1
    Debug *parms\parm2
    Debug *parms\parm3
    Debug *parms\parm4
EndProcedure

dsp.DoSomethingParms\parm1 = "This is the first parameter"
dsp\parm2 = 42
dsp\parm3 = 2 * 42
dsp\parm4 = "4 for illustration can use more! Maybe even arrays?"

DoSomething(dsp)
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

..

Post by NoahPhense »

AlGonzalez wrote:

Code: Select all

Structure DoSomethingParms
    parm1.s
    parm2.l
    parm3.l
    parm4.s
    ; etc.
EndStructure

Procedure.l DoSomething(*parms.DoSomethingParms)
    Debug *parms\parm1
    Debug *parms\parm2
    Debug *parms\parm3
    Debug *parms\parm4
EndProcedure

dsp.DoSomethingParms\parm1 = "This is the first parameter"
dsp\parm2 = 42
dsp\parm3 = 2 * 42
dsp\parm4 = "4 for illustration can use more! Maybe even arrays?"

DoSomething(dsp)

Very kewl, thanks much AL for the example.


There ya go techjunkie. I guess now if we
wanted to, we could simulate a jet engine..? lol

- np
techjunkie
Addict
Addict
Posts: 1126
Joined: Wed Oct 15, 2003 12:40 am
Location: Sweden
Contact:

Re: ..

Post by techjunkie »

NoahPhense wrote:There ya go techjunkie. I guess now if we
wanted to, we could simulate a jet engine..? lol
Hehe... Thanks! Well, I know you can use structures as parameters... BUT it doesn't solve everything... Sometimes you really want parameters... I can name a few examples...

01, When you want the sideeffects of call by reference or call by value
02, When you are in big programming teams
03, When you don't want everything "global"
04, When you are doing a private "module"

That's a few...
Image
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Post Reply