Post Reply 
Casio 7400gII
04-26-2022, 06:56 AM
Post: #1
Casio 7400gII
Hello,
i'm actually just a software user, but i'm currently trying my hand at programming Casio-Basic (Casio 7400gII; Casio 9860gII) and Sharp-Basic (PC 1403; e500).
I also own a couple of HP calculators; I use a HP 48sx daily in the office.

I have the following program:
Code:
   Lbl 1
   Cls
   RanInt#(1,7)->A
   RanInt#(1,16)->B
   Locate B,A, "Hello"
   Getkey != 47 => Goto 1
Unfortunately the program does not do what i want.
Before each loop the display should be cleared [cls].
Currently the calculator is cluttering up the display, which is not what i want.
Where am I making a mistake?
Can someone help me ?
Thanks a lot

8years elementary school, 2y business school; no bachelor/master, etc.;
but always interested in simple mathematics & calculators
Find all posts by this user
Quote this message in a reply
04-26-2022, 12:02 PM
Post: #2
RE: Casio 7400gII
Use ClrText. Cls clears the graphics screen.
Find all posts by this user
Quote this message in a reply
04-26-2022, 01:57 PM
Post: #3
RE: Casio 7400gII
<clrtext> i had already tried. Unfortunately it does not bring the desired result. Because the loop runs through too fast, no text appears.

I think that i have to add a wait loop when using <clrtext>.
Let's see if i can do that. I have unfortunately still no experience in programming.

8years elementary school, 2y business school; no bachelor/master, etc.;
but always interested in simple mathematics & calculators
Find all posts by this user
Quote this message in a reply
04-27-2022, 07:32 AM
Post: #4
RE: Casio 7400gII
Key 47 is exit.
I am pretty sure this command cannot interrupt the program so the loop will run till you hit AC button
Find all posts by this user
Quote this message in a reply
04-27-2022, 10:04 AM
Post: #5
RE: Casio 7400gII
Using the correct symbol for the relational operator "not equals" when checking GetKey for 47 then the program runs correctly on my FX-CG50 and terminates on pressing the EXIT key.

It also runs on a real CFX-9860G and an emulated FX-9860G. These do not have RanInt# so I changed the code to (for example) INT(Ran#*7)+1 from RanInt#(1,7)

I do not have a FX-7400GII, but looking at the manual I see no reason why it should not work.
Find all posts by this user
Quote this message in a reply
04-27-2022, 11:37 AM
Post: #6
RE: Casio 7400gII
Do
GetKey ->K
RanInt#(1,7)->A
RanInt#(1,16)->B
Locate B,A, "Hello"
LpWhile K<>47

<> means not equal
Find all posts by this user
Quote this message in a reply
04-28-2022, 03:10 PM
Post: #7
RE: Casio 7400gII
Thanks for your efforts.

(04-27-2022 10:04 AM)Hollerith Wrote:  Using the correct symbol for the relational operator "not equals" ...

I'm using the right symbol, I just didn't know how to represent it here, so I took "!="

(04-27-2022 10:04 AM)Hollerith Wrote:  ...It also runs on a real CFX-9860G and an emulated FX-9860G ...

I have seen that the program runs on a Casio 5800p and as tested by you on a 9860g.
There have certainly been changes in the Casio OS. The 9860gII now also has RanInt#, ..., and "cls" has been changed.

(04-27-2022 11:37 AM)klesl Wrote:  Do
GetKey ->K
...

I am sorry, but the program does not do what I want:
1. clear display
2. "Hello" on display (Random)
3. delete display
4. "Hello" at another place on display (Random)
5. delete display
6. and so on
Therefore I used "cls" or tried "ClrText".

Now my ambition is awakened
I'll replace "cls" with "clrText" next, and try to include a wait loop in my program above.
I think this will work as I want it to.

addendum: I use a translator

8years elementary school, 2y business school; no bachelor/master, etc.;
but always interested in simple mathematics & calculators
Find all posts by this user
Quote this message in a reply
04-28-2022, 04:53 PM
Post: #8
RE: Casio 7400gII
Well, you are displaying HELLO and clearing the HELLO during one loop, so the results is blank screen with displayed busy indicator (square at the top right corner), because the disaplaying HELLO and clearing it runs practially in the same moment.
Unfortunately there is no Pause command in current Casio Basic, so you need to insert between locate and clrtext some loop, e.g. summation, factorial, product, addition, substraction, factorization, to see the "HELLO" for certain time before clearing it.
Find all posts by this user
Quote this message in a reply
04-28-2022, 05:01 PM (This post was last modified: 04-28-2022 05:10 PM by Pälzer.)
Post: #9
RE: Casio 7400gII
This is exactly what I meant in my post no. 3
(04-26-2022 01:57 PM)Pälzer Wrote:  I think that i have to add a wait loop when using <clrtext>

short subtraction loop inserted, program works as desired.
Thanks

edit: 2nd paragraph inserted

8years elementary school, 2y business school; no bachelor/master, etc.;
but always interested in simple mathematics & calculators
Find all posts by this user
Quote this message in a reply
04-28-2022, 05:12 PM
Post: #10
RE: Casio 7400gII
Great :-)
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)