Posted 19 August 2013 - 03:37 AM
string associated with converting a Latitude,Longitude into an 8 character alpha-numeric
It uses ceil, mod() and other functions when I write working routines in other languages
including Fortran, Pascal, Octave and C.
But I see no Ceil(ing) or Floor functions in Casio 9860.
and I am getting very strange "MA ERROR" using Mod() function when variable contains
a mixed-value. Enter integer positive or negative values, and it gets close to generating the
first 2 Letters needed.
Enter something like 42.1, -80.1 and MOD() wants to generate "MA ERROR", but I do not
Don't know if any one has already tried to tackle this sort of routine in Casio Basic yet,
but I'd love to see how you did it if so. :- )
maverich40 at ya hoo dot com
Posted 19 August 2013 - 09:11 AM
floor(X): (note that != is supposed to be the unequal sign)
Int X-(X<0 And Frac X!=0)ceil(X): (almost the same, it has a + in place of the - and a > in place of the <)
Int X+(X>0 And Frac X!=0)mod(X,Y): (like it was done on calculators before 9860 with OS 2.00, which introduced the Mod command you noticed, but that command apparently accepts integer numbers only)
Posted 19 August 2013 - 07:51 PM
Apparently, and frankly I am still amazed, my test data and "real data" appear to produce the
correct output from the Casio 9860GII, using LITERAL formulas for Ceil,Mod...
(weighed against my Pascal and Octave version of the same algorithm used)
You enter a Latitude and Longitude, positive or negative values accepted now,
and the Alpha - Numeric (Digit) String appears left-to-right on the top line of the display!
How do people manage to produce listings of 9860 programs using the proper symbols, etc,
and post them here. I don't mind posting this routine, others can check it for errors,
or a more elegant way of doing it!
thank you *everyone* who helped make this possible by sharing your knowledge.
//Maverich40 at ya hoo dot com//
Posted 20 August 2013 - 01:12 PM
Well, there are some symbols that can't be displayed here, so that's difficult. However, there are some conventions for describing special symbols, for example ->, =>. Commands with names are usually just written down letter by letter (in the calculator's memory, these commands are one or two bytes long, not more). There is a program called Casform (http://spiderpixel.c...sformindex.html) that can convert between several file formats, including g1m (for 9860 series), cat (for CFX and AFX series), cas (an old format which is mostly the same as the on-calc bytecode format) and txt/ctf (ctf means "casio text format"). The txt/ctf format is the best one for posting it in a code block, the cat format looks similar, but with a backslash before any command or special symbol name to avoid ambiguities.
For small code snippets like those I posted above, simply typing it into the computer while looking at the calc's screen might be an option as well.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users