Author |
Message |
pr0xiler
|
Posted: Fri Mar 11, 2005 11:16 pm Post subject: Procedure help |
|
|
I'm making a GUI program.. and im having trouble with procedures....
Is there a way to make a procedure return to the begining of the program from the top as in:
%top of program i want to return to
var random : int
put "Hi, welcome to my program"
procedure return1
(code to return to top here)
end return1
I then want to use this "return1" value in other procedures to return to the beginning of the program(marked by "%")
Basically what it does is open a new page after you click a button taking you somewhere.. and I want to make a back button(I already know how to make buttons) to return to the very beginning where the program started.
Thanks
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
mike200015
|
Posted: Fri Mar 11, 2005 11:30 pm Post subject: (No subject) |
|
|
theres a few different ways you could do it, 1 way is , make the begining of the program into a procedure, and name it return 1, and then in the program when u type in return 1, then it will go back and run the begining of the program
|
|
|
|
|
|
Tony
|
Posted: Fri Mar 11, 2005 11:30 pm Post subject: (No subject) |
|
|
think loops
|
|
|
|
|
|
pr0xiler
|
Posted: Fri Mar 11, 2005 11:34 pm Post subject: re |
|
|
alright, i tried both ways... and a procedure cant be declared inside another procedure... and procedures cant be declared in loops.
|
|
|
|
|
|
mike200015
|
Posted: Fri Mar 11, 2005 11:37 pm Post subject: (No subject) |
|
|
if ur doing my way, then make them 2 seperate procedures, and if your doin tony's way then u dont need to make another procedure
|
|
|
|
|
|
pr0xiler
|
Posted: Fri Mar 11, 2005 11:46 pm Post subject: (No subject) |
|
|
could you please give me an example of how i could do this with loops? (BTW I have lots of procedures in the body of my code that i want to return to the top of also).
Thanks guys
|
|
|
|
|
|
mike200015
|
Posted: Fri Mar 11, 2005 11:50 pm Post subject: (No subject) |
|
|
can u post ur code.. or like 1 procedure of it.. so i can c wat ur programs like?
|
|
|
|
|
|
pr0xiler
|
Posted: Fri Mar 11, 2005 11:53 pm Post subject: (No subject) |
|
|
Heres the program (attatched)
Description: |
|
Download |
Filename: |
gui1.tu |
Filesize: |
6.18 KB |
Downloaded: |
141 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
mike200015
|
Posted: Fri Mar 11, 2005 11:54 pm Post subject: (No subject) |
|
|
k.. ill take a look.. and c if i can get it
|
|
|
|
|
|
pr0xiler
|
Posted: Fri Mar 11, 2005 11:55 pm Post subject: (No subject) |
|
|
Thank you
|
|
|
|
|
|
Tony
|
Posted: Fri Mar 11, 2005 11:56 pm Post subject: (No subject) |
|
|
I wrote a tutorial on how to use loops to move around your program. I think you should read that.
While at it, read another tutorial to find out how to use procedures.
|
|
|
|
|
|
mike200015
|
Posted: Fri Mar 11, 2005 11:56 pm Post subject: (No subject) |
|
|
ok.. so what part do you want to return to.. the main screen wit all the buttons?
|
|
|
|
|
|
pr0xiler
|
Posted: Fri Mar 11, 2005 11:56 pm Post subject: (No subject) |
|
|
Thank you
(I want to return it to the screen that shows on the startup of the program, when you press the back button)
|
|
|
|
|
|
pr0xiler
|
Posted: Fri Mar 11, 2005 11:57 pm Post subject: (No subject) |
|
|
Quote:
ok.. so what part do you want to return to.. the main screen wit all the buttons?
Thats right
|
|
|
|
|
|
mike200015
|
Posted: Fri Mar 11, 2005 11:59 pm Post subject: (No subject) |
|
|
so that part is at the bottom right now, correct?
|
|
|
|
|
|
|