Jump to content



Photo
- - - - -

Time counting, pls help


  • Please log in to reply
1 reply to this topic

#1 Satoshi

Satoshi

    Newbie

  • Members
  • Pip
  • 5 posts

  • Calculators:
    CFX 9860GII SD

Posted 19 November 2017 - 12:07 PM

Is it possible to count time while program is running? I wanted to add screen with score and how long it toke to beat the game, but I don't know how to do this. 



#2 Krtyski

Krtyski

    Casio Addict

  • Members
  • PipPipPip
  • 82 posts
  • Gender:Male
  • Location:Tokyo, Japan
  • Interests:programming, smooth Jazz and 4-wheel driving.

  • Calculators:
    FX-502P, FX-602P, fx-603P,
    fx-4500P, fx-5800P,
    fx-9860GII-2(SH4A),
    fx-9860GII SD,
    fx-CG20,
    fx-CG50

Posted 03 December 2017 - 12:27 PM

Hi Satoshi

 

Casio Basic does not have timer commands.

So if you do not need to measure exact time, just using loop with incremental variable may help;

 

0->C

Do

Getkey->K

Isz C

[some process]

LpWhile K≠[keucode of key that you want to get out of this loop with]

 

then use C to refer count of loop.

 

Good luck!


Edited by Krtyski, 03 December 2017 - 12:28 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users