Jump to content



Photo
- - - - -

How Can I Use The Randomizer


  • Please log in to reply
1 reply to this topic

#1 Overklopper

Overklopper

    Newbie

  • Members
  • Pip
  • 2 posts

  • Calculators:
    CP300

Posted 01 April 2004 - 09:22 AM

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?

#2 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

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. myList1 is the begining of the list.

good luck :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users