Author |
Message |
battleroyale
|
Posted: Thu Apr 14, 2005 1:07 pm Post subject: (No subject) |
|
|
so what shuld i learn now? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Martin
![](http://www.compsci.ca/wiki/images/4/46/CanadianStickUp.jpg)
|
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. |
|
|
|
|
![](images/spacer.gif) |
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.... |
|
|
|
|
![](images/spacer.gif) |
Martin
![](http://www.compsci.ca/wiki/images/4/46/CanadianStickUp.jpg)
|
Posted: Thu Apr 14, 2005 6:20 pm Post subject: (No subject) |
|
|
Look up Rand.Int |
|
|
|
|
![](images/spacer.gif) |
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 |
|
|
|
|
![](images/spacer.gif) |
jamonathin
![](http://compsci.ca/v3/uploads/user_avatars/57683465145f851a43dd9a.gif)
|
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 |
|
|
|
|
|
![](images/spacer.gif) |
Martin
![](http://www.compsci.ca/wiki/images/4/46/CanadianStickUp.jpg)
|
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. |
|
|
|
|
![](images/spacer.gif) |
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 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
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 ![Doh! Doh!](images/smiles/eusa_doh.gif) |
|
|
|
|
![](images/spacer.gif) |
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] |
|
|
|
|
![](images/spacer.gif) |
|