Author |
Message |
Thuged_Out_G
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Sat Jan 10, 2004 12:23 am Post subject: (No subject) |
|
|
a nice collection of links to most basic tutorials way to go.+Bits
make sure to check out [Turing Tutorials] and [Source Code] for additional info. Since if you ask a question that was already answered a number of times, you'd probably just be refered to the tutorial anyways |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
shorthair
|
Posted: Sun Feb 01, 2004 7:40 pm Post subject: (No subject) |
|
|
This is the first time ive seen this , never looked in her e, really great just , you just helped me find out some infor on printing , thakns for the eawsome tutorial keep up hte good work
+ BITS , |
|
|
|
|
|
AsianSensation
|
Posted: Sun Feb 15, 2004 9:41 pm Post subject: (No subject) |
|
|
also, remember, as recneps and many other people have pointed out, always check with your Turing Reference manual first. Many question, if not the majority, depends on that F10 button and some creativity on your part. |
|
|
|
|
|
the_short1
|
Posted: Tue Feb 24, 2004 7:56 am Post subject: (No subject) |
|
|
yea... Good job Thug
this should(hopfully) limit some in our help....
like common.... almost 10 000 posts........ thats CRZY
+3 bits |
|
|
|
|
|
kingpin
|
Posted: Thu Jun 10, 2004 12:15 am Post subject: (No subject) |
|
|
heres a simple one i cant figure out
whats the command to end your program...
quit doen'st work... WHAT IS IT! |
|
|
|
|
|
Paul
|
Posted: Thu Jun 10, 2004 12:25 am Post subject: (No subject) |
|
|
its
|
|
|
|
|
|
the_short1
|
Posted: Thu Jun 10, 2004 8:19 am Post subject: (No subject) |
|
|
no.. return DOES NOT WORK
return is to end a proc prematurely
code: |
proc hey
var c : int := 0
loop
c += 1
if c > 10 then
return % this will end the proc and RETURN to ur program!
end loop
end hey
|
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
beard0
|
Posted: Thu Jun 10, 2004 9:41 am Post subject: (No subject) |
|
|
This will end your program:
|
|
|
|
|
|
Tony
|
Posted: Thu Jun 10, 2004 11:24 am Post subject: (No subject) |
|
|
haha
asset false will crash the program
and return does work... you just need to put it in the right place
HoltSoft wrote:
A return statement terminates the procedure (or main program) in which it appears.
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
the_short1
|
Posted: Thu Jun 10, 2004 2:51 pm Post subject: (No subject) |
|
|
i think by main program they mean if u put return in a turing UNIT to end it... ..
meh.. ill try that..ok... just tried it...
return does end the program prematurely! but it does not go to LAST line of code.....
try this out..
code: |
var win := Window.Open ("graphics:max;max,nobuttonbar")
put "Trying to close window when 10 apears! But it WONT close return aint good for that kind of thing... :("
for a : 1..15
put a
delay (a)
if a = 10 then
return
end if
end for
Window.Close (win)
|
that is why i wouln't use return to end a program.... the WINDOW WONT CLOSE!
instead u can just use a boolean variable!
code: |
var endp : boolean := false
var win := Window.Open ("graphics:max;max,nobuttonbar")
loop
put "close window when 10 apears!"
for a : 1..15
put a
delay (a**3)
if a = 10 then
endp := true %% instead of return
end if
exit when endp = true
end for
exit when endp = true
end loop
Window.Close (win)
|
as u can see..... u just make that boolean variable false...
and have exit when boleanvarname = false in all ur loopz or w/e... |
|
|
|
|
|
Paul
|
Posted: Thu Jun 10, 2004 5:46 pm Post subject: (No subject) |
|
|
kingpin wrote:
whats the command to end your program...
Well, "return" certainly ends my program.
code: |
loop
if hasch then
return
end if
end loop
put "paul"
|
Note it doesn't print paul |
|
|
|
|
|
|