Jump to content



Photo
- - - - -

Additional Functions For Os2.00


  • Please log in to reply
14 replies to this topic

#1 Mardoxx

Mardoxx

    Casio Fan

  • Members
  • PipPip
  • 35 posts

  • Calculators:
    9860G SD

Posted 30 May 2009 - 11:54 PM

Has anyone used them yet?

such as store string?
also, string search and things like that look pretty cool

or the MENU command to create a menu?

I'm going to have a play ;)

Edited by Mardoxx, 30 May 2009 - 11:56 PM.


#2 noname11

noname11

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 314 posts
  • Gender:Not Telling

Posted 31 May 2009 - 08:50 PM

I hate strings because of: http://www.casiocalc...?showtopic=4410
I hate "Menu" because of: GOTO = NO GO!

ClrText
3
Menu "Title","Yes",0,"No",1,"Cancel",2
Lbl 0
Ans-1
Lbl 1
Ans-1
Lbl 2
Ans-1
ClrText
If Not Ans
Then "Yes"
Else If Ans=1
Then "No"
Else "Cancel"
IfEnd
IfEnd


#3 noname11

noname11

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 314 posts
  • Gender:Not Telling

Posted 28 June 2009 - 02:57 PM

As it seems, they did not fix the interpreter bug that produces a system error:
1
Norm 2
EngOff
ClrText
"Erasing Flash Mem...	 %" // five spaces
"cfxm"->List 1
Do
List 1
Do
LpWhile Not Ans
0
For 0->I To 100 Step 5
Locate 2,2,I
Next
Locate 7,2,"Done."
LpWhile 1
If "Done" appears and you press [AC/on], it fatally crashes. ;)

PS: Strange "Already Exists" error on OS 2.00.
"A"->List 1
""->List 1


#4 Martin

Martin

    Casio Freak

  • Members
  • PipPipPipPip
  • 121 posts
  • Gender:Male
  • Location:Praha
  • Interests:asm on cfx9850

  • Calculators:
    fx82l
    fx7700GB
    cfx9850G
    TI92
    fx9860G SD
    Rheinmetall KEL IIc
    H. W. Ebmeyer - Tarema
    fx cg20

Posted 29 June 2009 - 09:50 AM

PS: Strange "Already Exists" error on OS 2.00.

"A"->List 1
""->List 1


I think this may be correct behaviour as the interpreter keeps the list's names unique. There are probaly next lists (e.g. List 26) with empty name.
But in general it seems some parts of the CASIO Basic interpreter were not properly tested. And some bugs are there (in various permutations) many years.
For example the famous command Dsz:
* fx7700GB (or 8700 GB), cca 1992:
Dsz <simple variable> worked correctly but Dsz <variable accessed by index> worked as Isz
But if you added Ran# to the index, then both Dsz and Isz worked as Dsz (e.g. Isz A[3+Ran#])
* fx7700GE (or 7700 GH), cca 1994: if I remember correctly,it has problem with Dsz - reach zero in graph mode:
1->A:Plot :Dsz A
This caused the RAM to be overwritten and ready for reset only :-)
* cfx9850G,cca 1996: The <skip next command on zero> feature was able to sink into the next program:
Have 2 programs, the first contained at the end following: 1->X:Dsz X
Then executing the first program the interpreter continued to interpret the second program.
With very interesting side effects when one program was in COMP and another in BASE-N mode
* 9860 - If the last result to be displayed is matrix or list, then Isz/Dsz skips next command regardless of the control variable:
123->A:List 1:Dsz X:"Skip me"

BTW: is there some centralized list of known bug of fx9860G ?
I am ready to expand it :-)

Edited by Martin, 30 June 2009 - 02:05 PM.


#5 noname11

noname11

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 314 posts
  • Gender:Not Telling

Posted 29 June 2009 - 08:10 PM

I think this may be correct behaviour as the interpreter keeps the list's names unique. There are probaly next lists (e.g. List 26) with empty name.

Well...
ClrList
"A"->List 1
"A"->List 2
=> Already exists. No bug
ClrList
""->List 1
""->List 2
=> Nothing. Bug?
ClrList
"A"->List 1
"B"->List 1
=> Nothing. No bug.
ClrList
"A"->List 1
""->List 1
=> Already exists. Bug?
Anyway, this raises a very important question: How can you verify that your list name is unique?

Even though there's a trick to detect if a list is "empty" (0->List 11:Dim List 1=1=>Empty), there's no way to detect if a list name exists (List 1[0]->Str 1:Not Strlen(Str 1)=>No_list_name [Does not work!]). Therefore you cannot compare your new list name against all other lists, unless you use some magic list value (E.g. List 12) that means: Yes, this list has a list name.

By the way, you can now access lists with variables!! :D
List I or List "List_Name" or List Str 1
File I
ClrList I
Resid-List I
=> All list commands can use list variables!
StoPict I
RclPict I
RclCapt I
----
Missing support (Will it be in OS 2.10?):
BG-Pict I
StoGMEM I
RclGMEM I
Str I // Very useful!

Is there some centralized list of known bug of fx9860G

I don't know any, but I remember a bug that produced a math error if some list or matrix commands appeared after an Isz or Dsz command. This was, however, fixed on the Slim and in OS 1.05.

Edited by cfxm, 29 June 2009 - 10:02 PM.


#6 Martin

Martin

    Casio Freak

  • Members
  • PipPipPipPip
  • 121 posts
  • Gender:Male
  • Location:Praha
  • Interests:asm on cfx9850

  • Calculators:
    fx82l
    fx7700GB
    cfx9850G
    TI92
    fx9860G SD
    Rheinmetall KEL IIc
    H. W. Ebmeyer - Tarema
    fx cg20

Posted 30 June 2009 - 08:44 AM

Well...

Mea culpa. Yes it is a bug. It seems the interpreter first check if change will occur, then if the new name is unique. Unconsidered as usual.:-)

Missing support (Will it be in OS 2.10?):
Str I // Very useful!

Yes, this would be very useful. I would also appreciate:
1. character access:
Str 1[4]->A
B->Str I[D]
2. Local routines support (call code at label specified):
Prog A
...
Lbl A
...
Return
3. Mutientry programs (call program but from label)
Prog "TEST",X would call program "TEST" from label X
4. Storing results to the string
5. Dim of empty matrix should return {0,0}
6. Dim of empty list should return 0
7. Empty string should return "", StrLen(empty string) should return 0
8. Fix new hurried features. For example why I cannot compute compatible values like:
1[Day]+2[Hours]-11[ns]|>[min]
9. Unlimit N-BASE mode - allow f-mem, clipboard.
10. Complex numbers. If Z is complex, why e^Z works and sin(Z) doesn't?
...
Could somebody from CASIO comment this ?

#7 noname11

noname11

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 314 posts
  • Gender:Not Telling

Posted 30 June 2009 - 01:38 PM

Empty string should return "", StrLen(empty string) should return 0

""->Str 1
Strlen(Str 1)=0

The problem is that the string has to be initialized. What about returning -1 for error?

Edited by cfxm, 30 June 2009 - 01:43 PM.


#8 Martin

Martin

    Casio Freak

  • Members
  • PipPipPipPip
  • 121 posts
  • Gender:Male
  • Location:Praha
  • Interests:asm on cfx9850

  • Calculators:
    fx82l
    fx7700GB
    cfx9850G
    TI92
    fx9860G SD
    Rheinmetall KEL IIc
    H. W. Ebmeyer - Tarema
    fx cg20

Posted 30 June 2009 - 01:53 PM

The problem is that the string has to be initialized. What about returning -1 for error?

Yes, if it is worthy to differentiate between empty and uninitialized strings.
But I think it would be much better to assume all uninitialized strings as empty.
Similar thing happens on cfx9850 where you can delete single letter variables (A~Z,r, theta) and then when read they contain value 0.

Edited by Martin, 30 June 2009 - 01:56 PM.


#9 Martin

Martin

    Casio Freak

  • Members
  • PipPipPipPip
  • 121 posts
  • Gender:Male
  • Location:Praha
  • Interests:asm on cfx9850

  • Calculators:
    fx82l
    fx7700GB
    cfx9850G
    TI92
    fx9860G SD
    Rheinmetall KEL IIc
    H. W. Ebmeyer - Tarema
    fx cg20

Posted 01 July 2009 - 08:21 AM

As it seems, they did not fix the interpreter bug that produces a system error:

It can be shorted to following:
Do
{1
Do
LpWhile 1
The calculator emulator crashes too:-)
http://www.rkk.cz/~m...s/9860crash.png

#10 noname11

noname11

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 314 posts
  • Gender:Not Telling

Posted 01 July 2009 - 02:40 PM

Oh, I forgot to tell you about another bug. :)

Set input/output to linear.
Set mode to dec, hex, bin or oct.
Type in any valid number and press <span class=EXE' />.
Set mode to comp.
Type in the carriage return character (<span class=Shift' /> + <span class=EXE' />).
Press the [dUP] cursor key.

This will freeze your calculator.

Edited by cfxm, 01 July 2009 - 02:46 PM.


#11 Martin

Martin

    Casio Freak

  • Members
  • PipPipPipPip
  • 121 posts
  • Gender:Male
  • Location:Praha
  • Interests:asm on cfx9850

  • Calculators:
    fx82l
    fx7700GB
    cfx9850G
    TI92
    fx9860G SD
    Rheinmetall KEL IIc
    H. W. Ebmeyer - Tarema
    fx cg20

Posted 01 July 2009 - 03:12 PM

Oh, I forgot to tell you about another bug. :)
This will freeze your calculator.

The emulator crashes too:
The instruction at "0x0043c2ed" referenced memory at "0x00bc8000". The memory could not be "read".

This error message gives a hint: the emulator doesn't seem to be real emulator. I think it is a x86 application based on the same source code as the calculator firmware + extra routines emulating display + keyboard.

#12 noname11

noname11

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 314 posts
  • Gender:Not Telling

Posted 05 September 2009 - 06:16 PM

I was thinking about implementing my own Basic-like language using... well, using Casio-Basic. :blink: Yeah, and while doing so I found a nice Exp>Str() buffer overflow. :P
My idea was to put the whole user program into a string and let then another program analyze it. This would allow totally new syntax and semantics! :nod: - However, strings can only store up to 255 bytes! :knife: I looked around and tried out our beloved function memory. Unfortunately, "Text"->fn1 does only allow 255 bytes too! Okay, I knew you can store larger programs manually, but how could I chop up the program into 255 byte chunks? I was sure that Exp>Str(fn1,Str 1) would always extract the first 255 bytes - no chance to get subsequent chunks... well, not exactly - it simply crashed :lol::

Posted Image

Too bad we can't do this... :nonono:

PS: Did you notice that {0}->List "Some" uses the next free entry if it does not exist?
PPS: Don't copy lowercase characters from old CFX programs into strings - they may be corrupted.
PPPS: Please Casio, add support for more variables like "Str I", "fn I", "BG-Pict I", "StoGMEM I" and "RclGMEM I" and allow the conversion of numbers into strings. We don't like this "?->Str 1" stuff. Also, the link menu "Select Trans Type" seems to be redundant. I don't know anyone using its "Current" feature (main memory). Please remove this menu.

Edited by cfxm, 06 September 2009 - 07:07 PM.


#13 Martin

Martin

    Casio Freak

  • Members
  • PipPipPipPip
  • 121 posts
  • Gender:Male
  • Location:Praha
  • Interests:asm on cfx9850

  • Calculators:
    fx82l
    fx7700GB
    cfx9850G
    TI92
    fx9860G SD
    Rheinmetall KEL IIc
    H. W. Ebmeyer - Tarema
    fx cg20

Posted 17 September 2009 - 11:59 AM

I was thinking about implementing my own Basic-like language using... well, using Casio-Basic. :blink:

Yes, I tried something similar on old 9850G - it was a simple command line interpreter,with strings stored in lists and very slow display routine.
I named in UNIX :-) It's still on my web page :-)

PS: Did you notice that {0}->List "Some" uses the next free entry if it does not exist?

Nice function.
But try following:
{0}->List "Some" // list "Some" created
2->Dim List "Some" // list "Some" updated to 2 items but also...
2->Dim List "Some" // ERROR - because the list has lost it's name in previous step so this fails

#14 noname11

noname11

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 314 posts
  • Gender:Not Telling

Posted 17 September 2009 - 02:38 PM

2->Dim List "Some" // list "Some" updated to 2 items but also...
2->Dim List "Some" // ERROR - because the list has lost it's name in previous step so this fails

Yes, I know. {0}->List "Some" should be the same as 1->Dim List "Some".

#15 noname11

noname11

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 314 posts
  • Gender:Not Telling

Posted 21 September 2010 - 10:20 PM

(1) Some string commands should generate a string answer that can be used in subsequent instructions as "Str Ans".
(2) I would suggest the new command Var>Str(VAR, STR STR_NUM) for variable to string conversion.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users