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

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




PostPosted: Sat Nov 15, 2003 5:26 pm   Post subject: a procedure

can a procedure be in another procedure??how can i do that?
like:
code:
procedure a
     procedure b
        ......
     end b
     .....
     b
     ....
end a
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sat Nov 15, 2003 5:30 pm   Post subject: (No subject)

you can't declear a procedure inside another procedure Confused That just doesnt make sence. What you do is
code:

procedure b
...
end b

proceduer a
...
b
..
end a


Just got to make sure that procedure b comes before a in this case.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
appling




PostPosted: Sat Nov 15, 2003 5:35 pm   Post subject: (No subject)

so, only the procedure behind can be used in the after one...
right?
Tony




PostPosted: Sat Nov 15, 2003 5:43 pm   Post subject: (No subject)

exactly. Though that might cause problems if you have a bunch of difference procedures, each using each other in such a way that you can't organize them to work Mad though that's probably just bad program design
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
appling




PostPosted: Sat Nov 15, 2003 5:43 pm   Post subject: (No subject)

thanks i get it
AsianSensation




PostPosted: Sat Nov 15, 2003 5:45 pm   Post subject: (No subject)

actually, there exist function prototype in turing, just do this

code:
forward procedure a
forward procedure b

body a
b
end a

body b
a
end b


and it works.
Tony




PostPosted: Sat Nov 15, 2003 5:49 pm   Post subject: (No subject)

awesome 8) just like in C++ Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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  [ 7 Posts ]
Jump to:   


Style:  
Search: