Posted: Tue Mar 08, 2005 3:49 pm Post subject: parameter pass
can someone help me on a parameter pass??? i tried looking in the tutorials but i couldnt find it
Sponsor Sponsor
Token
Posted: Tue Mar 08, 2005 4:56 pm Post subject: (No subject)
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
Posted: Tue Mar 08, 2005 5:05 pm Post subject: (No subject)
I'm pretty sure he ment function arguments
Turing:
procedure foo(bar:string) put bar
end foo
foo("this string is passed to function foo")
person
Posted: Tue Mar 08, 2005 5:43 pm Post subject: (No subject)
so is this all there is to parameter passes???
i heard it was really useful but i dont get how it's useful
Tony
Posted: Tue Mar 08, 2005 5:48 pm Post subject: (No subject)
person wrote:
i dont get how it's useful
write me a function that puts "foo" on the screen.
then another one that puts "bar".
person
Posted: Tue Mar 08, 2005 5:54 pm Post subject: (No subject)
procedure a
put "foo"
put "bar"
end a
i dont get it
atrain
Posted: Tue Mar 08, 2005 6:16 pm Post subject: (No subject)
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
Posted: Tue Mar 08, 2005 7:20 pm Post subject: (No subject)
thanx guys...i get it now
Sponsor Sponsor
Flikerator
Posted: Wed Mar 09, 2005 4:14 pm Post subject: (No subject)
person wrote:
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).