HP Forums
Casio 7400gII - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not remotely HP Calculators (/forum-9.html)
+--- Thread: Casio 7400gII (/thread-18304.html)



Casio 7400gII - Pälzer - 04-26-2022 06:56 AM

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


RE: Casio 7400gII - Hollerith - 04-26-2022 12:02 PM

Use ClrText. Cls clears the graphics screen.


RE: Casio 7400gII - Pälzer - 04-26-2022 01:57 PM

<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.


RE: Casio 7400gII - klesl - 04-27-2022 07:32 AM

Key 47 is exit.
I am pretty sure this command cannot interrupt the program so the loop will run till you hit AC button


RE: Casio 7400gII - Hollerith - 04-27-2022 10:04 AM

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.


RE: Casio 7400gII - klesl - 04-27-2022 11:37 AM

Do
GetKey ->K
RanInt#(1,7)->A
RanInt#(1,16)->B
Locate B,A, "Hello"
LpWhile K<>47

<> means not equal


RE: Casio 7400gII - Pälzer - 04-28-2022 03:10 PM

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


RE: Casio 7400gII - klesl - 04-28-2022 04:53 PM

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.


RE: Casio 7400gII - Pälzer - 04-28-2022 05:01 PM

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


RE: Casio 7400gII - klesl - 04-28-2022 05:12 PM

Great :-)