Author |
Message |
battleroyale
|
Posted: Thu Apr 14, 2005 1:07 pm Post subject: (No subject) |
|
|
so what shuld i learn now? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Martin
|
Posted: Thu Apr 14, 2005 1:11 pm Post subject: (No subject) |
|
|
How to use procedures and functions. After that, learn about classes, and finally learn about pointers. |
|
|
|
|
|
battleroyale
|
Posted: Thu Apr 14, 2005 5:37 pm Post subject: (No subject) |
|
|
alright...procedures dont...i actually got the basics of GUI. .
now im trying to make a lottery game and first problem i got is how to make it so that the numbers you can choose are only between 1-10
i tried putting var number : int:=(1,69) but that didnt work...what should i do?
ALso how do you make it so that if statements can contain more then one =
like if blah="a" or "b" or "c"
cuz that doesnt work...but it makes sence though.... |
|
|
|
|
|
Martin
|
Posted: Thu Apr 14, 2005 6:20 pm Post subject: (No subject) |
|
|
Look up Rand.Int |
|
|
|
|
|
battleroyale
|
Posted: Thu Apr 14, 2005 9:06 pm Post subject: (No subject) |
|
|
i understand random number already...i just don tknow how to put constraints on the numbers you can choose |
|
|
|
|
|
jamonathin
|
Posted: Fri Apr 15, 2005 7:46 am Post subject: (No subject) |
|
|
You cant put: code: | If whatever = "this" or "that" then |
You need to put whatever again.
code: | If whatever = "this" or whatever = "that" then |
|
|
|
|
|
|
Martin
|
Posted: Fri Apr 15, 2005 8:12 am Post subject: (No subject) |
|
|
This is because if statements function as follows
if [statement 1] = true or [statement 2] = true or ... then
So what your if statement 'if blah="a" or "b" or "c" ' translates to is:
if (blah = "a") = true or ('b' = true) or ('c' = true) then ..
as you see, although your statement makes sense in english, it doesn't make much sense in Turing. |
|
|
|
|
|
battleroyale
|
Posted: Fri Apr 15, 2005 2:02 pm Post subject: (No subject) |
|
|
ok thanks.....i got it....
NOW lol...how do you make a counter? i cant find the thread...someone give me the link |
|
|
|
|
|
Sponsor Sponsor
|
|
|
[Gandalf]
|
Posted: Fri Apr 15, 2005 5:26 pm Post subject: (No subject) |
|
|
Quote: If whatever = "this" or whatever = "that" then
hehehe, I didn't know that, I just used case statements - thanks!
What do you mean by counter?
code: |
var count : int := 1
loop
put count
delay(5)
count += 1
cls
end loop
|
or
code: |
for i : 1 .. 100
cls
put i
delay (10)
end for
|
both of those can be considered counters?
*edit* grr, thats two of those kinds of posts I've had to do in the same topic |
|
|
|
|
|
acidburn90
|
Posted: Wed Apr 20, 2005 9:47 pm Post subject: (No subject) |
|
|
yeh thats true... ive been working on turing for a long time (7 months) and i still sometimes have troubles with the GUI...
also one more thing...
someone in this forums did some pretty bad programming...
its bad programming to put
[code]
if answer:= "quit" then
exit
[/code]
its exit when answer:= "quit"
just making u didnt get i9t mixed for anything major[/quote] |
|
|
|
|
|
|