Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 parameter pass
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
person




PostPosted: 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
Sponsor
sponsor
Token




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: Tue Mar 08, 2005 5:54 pm   Post subject: (No subject)

procedure a
put "foo"
put "bar"
end a

i dont get it
atrain




PostPosted: 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




PostPosted: Tue Mar 08, 2005 7:20 pm   Post subject: (No subject)

thanx guys...i get it now
Sponsor
Sponsor
Sponsor
sponsor
Flikerator




PostPosted: 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).
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: