ID:179008
 
If I make a proc with several options:

proc/Whatever(msg="hi",color=1,bonus=1,tofu=15)

and I use the proc like this:

world << Whatever("What a wonderful day",15,72)

How does it decide which variables it's replacing with 15 and 72? Or does it just work in first come, first serve order?
I think its first come first serve, just like the built in procs. But im not sure. Better let a GOOD coder tell you, like LummoxJR :P

-Rcet
Foomer wrote:
If I make a proc with several options:

proc/Whatever(msg="hi",color=1,bonus=1,tofu=15)

and I use the proc like this:

world << Whatever("What a wonderful day",15,72)

How does it decide which variables it's replacing with 15 and 72? Or does it just work in first come, first serve order?

It goes in order, assuming any arguments you don't specify come at the end of the list, unless you use named arguments:
world << Whatever(msg="What a wonderful day",bonus=3)

You can use named arguments to skip args or use them out of order. Another way to skip args is just to put nothing between commas, like this:
world << Whatever("What a wonderful day",,3)


Lummox JR