
-----------------------------------
person
Tue Mar 08, 2005 3:49 pm

parameter pass
-----------------------------------
can someone help me on a parameter pass??? i tried looking in the tutorials but i couldnt find it

-----------------------------------
Token
Tue Mar 08, 2005 4:56 pm


-----------------------------------
umm depends on what you mean by parameter pass, do you mean pass as in password? and also post what code you have to give us an idea

-----------------------------------
Tony
Tue Mar 08, 2005 5:05 pm


-----------------------------------
I'm pretty sure he ment function arguments

procedure foo(bar:string)
put bar
end foo

foo("this string is passed to function foo")


-----------------------------------
person
Tue Mar 08, 2005 5:43 pm


-----------------------------------
so is this all there is to parameter passes???

i heard it was really useful but i dont get how it's useful

-----------------------------------
Tony
Tue Mar 08, 2005 5:48 pm


-----------------------------------
i dont get how it's useful

write me a function that puts "foo" on the screen.
then another one that puts "bar".

-----------------------------------
person
Tue Mar 08, 2005 5:54 pm


-----------------------------------
procedure a
    put "foo"
    put "bar"
end a

i dont get it

-----------------------------------
atrain
Tue Mar 08, 2005 6:16 pm


-----------------------------------
hes saying:

he wants to make a procedure... but it interacts with its arguments


eg:
foo (hi)
will return hi
this alone isnt usefull, but with other stuff it can be.. eg:

procedure foo(go : boolean)
if go = true then
put "foo is starting up"
put "foonizledom forever"
put "end of foo"
else
put "this has been disabled for now"
end foo

foo(true)

the arguments could be a variable, such as something which has been altered before... but the idea behind this is that the variable dies after it has ended... unlike making a varaible go at the begining of the program

-----------------------------------
person
Tue Mar 08, 2005 7:20 pm


-----------------------------------
thanx guys...i get it now

-----------------------------------
Flikerator
Wed Mar 09, 2005 4:14 pm


-----------------------------------
thanx guys...i get it now

Build a library of usefull proc's and anytime you need them just load em up and put them in your program, will save a lot of time (depending on what you make).
