Hello i have 2 questions about the programming of the CP300
First: How could I use the Randomizer to get numbers from 1 to 40 in a programm
and the second is, does it give in this Basic of the CP 300 arrays like in C
char *[]="gg this is 0","this is 1","this is 2",...
Because i am Programming now one Minesweeper clone for the CP300 with Pen control :=)
I think iu put it under the GPL
http://www.gnu.org/copyleft/gpl.html
Sorry for my Bad English i am only a 15 year old German pupil
Is anyone Interested in a Minesweeper clone?
How Can I Use The Randomizer
Started by
Overklopper
, Apr 01 2004 09:22 AM
1 reply to this topic
#1
Posted 01 April 2004 - 09:22 AM
#2
Posted 01 April 2004 - 01:33 PM
to get a random number 1-40:
rand(1,40)=>var
to make an array of strings with 10 elements:
fill("",10)=>myList
or
{"".""."".""."".""."".""."".""}=>myList
arrays are multi-type on the classpad so you can store strings and numbers in them at the same time, you could have done fill(0,10) to make an array of zeros and then stored strings in it without problems.
oh, and unlike C the index starts at 1, not 0. myList is the begining of the list.
good luck
rand(1,40)=>var
to make an array of strings with 10 elements:
fill("",10)=>myList
or
{"".""."".""."".""."".""."".""}=>myList
arrays are multi-type on the classpad so you can store strings and numbers in them at the same time, you could have done fill(0,10) to make an array of zeros and then stored strings in it without problems.
oh, and unlike C the index starts at 1, not 0. myList is the begining of the list.
good luck
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users