Jump to content



Photo
- - - - -

Input Box For Casio Basic

Input Box fx-5800P fx-9860GII

  • Please log in to reply
2 replies to this topic

#1 Krtyski

Krtyski

    Casio Freak

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

  • Calculators:
    FX-502P, FX-602P, FX-603P,
    fx-4000P, fx-7000G,
    fx-4500P, fx-4800P
    fx-5800P,
    CFX-9850G,
    CFX-9850GC PLUS
    fx-9860G,
    fx-9860G AU,
    fx-9860G Slim
    fx-9860GII SD,
    fx-9860GII-2,
    fx-9860GII-2 SD,
    fx-CG20, fx-CG50,
    fx-CP400
    fx-9860GIII
    fx-9750GIII
    fx-7400GIII

Posted 05 July 2015 - 08:22 AM

Hello everyone

 

*****

Link to image files has been fixed, sorry for the inconvenience.

*****

 

I've made many unit conversion programs for fx-5800P (and fx-9860GII). For example temp unit Fahrenheit

is still sometime confusing to me. Moreover pressure unit is really annoying to me, Americans use psi (use MKS unit system;-). Europeans likely use Bar (I'm OK ... 1 Bar is almost 1 atm,...easy!). My colleagees and I almost use Pa (it's international standard MKS!).

 

Anyway, when I think of good display design for unit conversion program, I believe it's important that all the numbers in different units can be seen at one view all the time without scrolling. So I should control location and length of input number. I hope to have an input command just like Edit Box control used for Windows programming.

 

I've been dreaming Casio Basic new command, LocInput which allows me to set coordinate and length of input, also I want to edit my input.

 

So I made 'Input Box' for Casio Basic. It's called from main program and runs as sub-routine.

 

With this program, simply set coordinate X and Y, max digits and select indicator type to prompt fix input value, then call Input Box, you can edit within the set maximum digits, after fixing your input by EXE key then it returns the input value;

 

4->X:3->Y:8->D:2->E

Prog "IN"

Z->A

 

'IN' is file name of the Input Box. Z is returned by the Input Box and the return is substituted to any variable A.

 

If you use Casio Basic input command ?->, instead of the above 3 lines code,

it's so simple like...

 

" K"?->K

 

but you have to allow scrolling. I do not like this.

 

So, let me show you how the Input Box is making your program better. 

 

Here is an example where I use the Input Box 'Temperature Conversion' Program;

 

TC9-Main_convert.jpg

 

Press 3 to input absolute temp...

 

TC9-Press_Menu3_convert.jpg

 

The Input Box appears where exactly I want with max 8 digits as I set.

 

Then input 77 that is liquid Nitrogen temp;

 

TC9-Press_77K_convert.jpg

 

You can edit your input, add more digits or delete by DEL key.

Press EXE to enter the input, then...

 

TC9-Result_77K_convert.jpg

 

I have my answer; converted temp of liquid Nitrogen.

 

Using Input Box, you see no scrolling and you see 3 values in one view. Now I hope you see what is about the Input Box and how it works on Casio Basic.

 

Just for your quick review, please try TempConv program for fx-9860GII.

Download: TEMPCONV (1gm file)

 

======

 

I made 3 versions for Input Box for each of fx-5800P and fx-9860GII (total 6 versions);

 

1. File Name: IN

This version allows you to input decimal number.

Download source;

- For fx-9860GII: IN ver 2.1G (g1m file)

- For fx-5800P: IN ver 2.0 (jpg file)

 

2. File Name: INP

This version allows you to input positive decimal number and 0 (zero).

Download source;

- For fx-9860GII: INP ver 2.1G (g1m file)

- For fx-5800P: INP ver 2.0 (jpg file)

 

3. File Name: INPI

This version allows you to input natural number (positive integer) and 0 (zero).

Download source;

- For fx-9880GII: INPI ver 2.1G (g1m file)

- For fx-5800P: INPI ver 2.1 (jpg file)

 

=====

 

Usage of Input Box;

 

[X coord]->X

[Y coord]->Y

[max digits]->D

[indicator type]->E

Prog "IN" [ or "INP" or "INPI"]

Z->[variable]

 

Indicator appears in the bottom line of LCD.

Indicator types;

- E=2; Large Indicator, <EXE>:ENTER

        TC9-Press_Menu3_convert.jpg

 

- E=1; Small Indicator, ▸E

        inputWET.jpg

 

- E = other than 2 and 1

        No indicator appears.

 

Important notice to use Input Box;

Please especially take care of variables you use in your main program which call Input Box as sub-routine. Because Casio Basic is ultimate global variables system.

 

Input Box uses following variables;

- X, Y, D, E for settings of Input Box

- C, I and F(this is used in IN and INP, not in INPI)

- Array variable Z[ ]

 

Please do not use array variable Z[ ]  in your main program.

You can use other variables, but substituted value of those are changed during functioning of Input Box, so use those variables in your main program taking this into account.

 

With slow fx-5800P, Input Box works properly (I should say acceptable in its response speed). Actually the first version was so slow, then changed its logic to get current speed.

 

=====

 

Here is test program of Input Box;

 

File Name: INTEST

- For fx-9860GII: INTEST (g1m file)

- For fx-5800P

0->S:0->T:0->U:0->Z
Locate 1,1,"1:"
Locate 1,2,"2:"
Locate 1,3,"3:"
 
While 1
 
-1->M
Do:Getkey->K
LpWhile K=0
K=36=>1->M
K=36=>2->M
K=37=>3->M
 
Locate 1,4,"                "
 
If M=1:Then
3->X:1->Y:10->D:2->E
Prog "INPI":Z->S
Else If M=2
Then
3->X:2->Y:10->D:1->E
Prog "INP":Z->T
Else If M=3
Then
3->X:3->Y:10->D:1->E
Prog "IN":Z->U
IfEnd:IfEnd
IfEnd
 
Locate 1,4,"Z="
Locate 3,4,Z
 
WhileEnd

Input Box has been originally developed for fx-5800P which dose not have string functions in Casio Basic. So this Input Box handles only number input. And this has been simply ported to fx-9860GII Casio Basic.

 

I will probably introduce some programs using Input Box as examples.


Edited by Krtyski, 15 July 2015 - 06:24 AM.


#2 souvick

souvick

    Newbie

  • Members
  • Pip
  • 1 posts

  • Calculators:
    GII

Posted 26 September 2016 - 01:15 PM

Hi,

 

The links to the sites http://egadget2.web....ives/in21g.html are broken/ blocked by antivirus softwares.

 

Could you provide an alternate link.

 

Best



#3 Krtyski

Krtyski

    Casio Freak

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

  • Calculators:
    FX-502P, FX-602P, FX-603P,
    fx-4000P, fx-7000G,
    fx-4500P, fx-4800P
    fx-5800P,
    CFX-9850G,
    CFX-9850GC PLUS
    fx-9860G,
    fx-9860G AU,
    fx-9860G Slim
    fx-9860GII SD,
    fx-9860GII-2,
    fx-9860GII-2 SD,
    fx-CG20, fx-CG50,
    fx-CP400
    fx-9860GIII
    fx-9750GIII
    fx-7400GIII

Posted 13 October 2016 - 01:32 PM

Hi souvick

 

Thank you for telling me the link error.

 

Let me make new link to download all the G1M files; Please try this.

 

Link to Input Box g1m files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users