Jump to content

- - - - -

Input Box For Casio Basic

Input Box fx-5800P fx-9860GII

  • Please log in to reply
2 replies to this topic

#1 Krtyski


    Casio Addict

  • Members
  • PipPipPip
  • 91 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 SD,

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;



Prog "IN"



'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;




Press 3 to input absolute temp...




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


Then input 77 that is liquid Nitrogen temp;




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

Press EXE to enter the input, then...




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"]



Indicator appears in the bottom line of LCD.

Indicator types;

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



- E=1; Small Indicator, ▸E



- 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

Locate 1,1,"1:"
Locate 1,2,"2:"
Locate 1,3,"3:"
While 1
LpWhile K=0
Locate 1,4,"                "
If M=1:Then
Prog "INPI":Z->S
Else If M=2
Prog "INP":Z->T
Else If M=3
Prog "IN":Z->U
Locate 1,4,"Z="
Locate 3,4,Z

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



  • Members
  • Pip
  • 1 posts

  • Calculators:

Posted 26 September 2016 - 01:15 PM



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


Could you provide an alternate link.



#3 Krtyski


    Casio Addict

  • Members
  • PipPipPip
  • 91 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 SD,

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