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

Username:   Password: 
 RegisterRegister   
 Calling procedures from inside procedures
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Paul Brenek




PostPosted: Sun May 23, 2004 5:31 pm   Post subject: Calling procedures from inside procedures

Hi All,

I am coding a game and one of my menus has the following procedures codes to buttons:
start a new game
resume a saved game
quit

I have two questions:

1. I am using setscreen to set up the game window. How do I close the screen (game window) on quitting? I am using return but it leaves the screen up. I tried quit but it did the same thing and added an error message window. This was no good.

2.The start new game is a procedure. I want to launch other procedures from it such as getting number of players and other types of user input. Anyone know how to do this since Turing will not allow you to call procedures from within procedures?

Thanks for all you help.
Sponsor
Sponsor
Sponsor
sponsor
LiquidDragon




PostPosted: Sun May 23, 2004 5:47 pm   Post subject: (No subject)

they do let u call procedures in procedures u just have to have the one you are calling before the one you are calling it in

EXAMPLE CODE:
code:

proc cookie
    %code stuffs
end cookie

proc start
    %code stuffs
    cookie
end start


basically it would look like that. Hope that helps your procedure problem
Paul




PostPosted: Sun May 23, 2004 6:46 pm   Post subject: (No subject)

You can call procedures from procedures, as long as the contained procedure is coded first.
and to close a window u must first open one
code:

var WinID:= Window.Open ("graphics: max; max; offscreenonly")
%program here
Window.Close (WinID)
Dan




PostPosted: Tue May 25, 2004 2:13 pm   Post subject: (No subject)

if you look in to the forward comand, it dose not even have to be code 1st but you just have to let turing know that is will be coded latter.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
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  [ 4 Posts ]
Jump to:   


Style:  
Search: