Jump to content



Photo
* * * * * 4 votes

C.Basic - International Release

Casio Basic C.Basic

  • Please log in to reply
702 replies to this topic

#561 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 15 January 2020 - 08:04 AM

-Fixed the bug that Alias for extension variables did not cause an error.

I was doing an enbug in this part.
Aliased labels and matrices no longer work. :bow:
I fixed it and uploaded it again.
Please download 1.43/2.43 again. :)
 


#562 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 15 January 2020 - 09:00 PM

I was a fan of HP and TI. But when I found out about CBASIC, I bought three 9860gii-2 calculators at once and loaded your CBASIC into them. My intuition told me that this is a worthwhile investment. The HP-50g and HP-Prime are two lame ducks develo6ped by enthusiasts without capital. The failure of the hp-39gii/gs models confirmed this. The 9860gii-2 had more intelligent hardware and software developers. I wish you continued success in Your work.
  • piu58 and CalcLoverHK like this

#563 CalcLoverHK

CalcLoverHK

    Casio Freak

  • Members
  • PipPipPipPip
  • 264 posts
  • Gender:Male
  • Location:Hong Kong
  • Interests:FPS games, C.Basic

  • Calculators:
    fx-50FHII (2019/1/30)
    fx-991ESPLUS-2 (2023/12/22)
    fx-3650PII (2022/1/15)
    fx-9750GIII (2020/6/13)
    fx-9860G Slim (2024/2/27)
    fx-9860GIISD (2023/3/27)
    fx-9860GIISD-2 (2024/2/5)
    fx-CG20CN (2023/2/12)
    fx-CG50 (2023/10/23)

Posted 16 January 2020 - 08:30 AM

@Hilb2

Thank you for using C.Basic. ;)

And fx-9860GIII has just annouced. You can check it out.



#564 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 16 January 2020 - 10:30 AM

@Hlib2
I feel quite honored. 
Thank you very much. :D
C.Basic is still under development, but I will do my best to develop a language that is more convenient for users.
 
The PDF manual project by @CalcLoverHK is also in progress. ^_^


#565 CalcLoverHK

CalcLoverHK

    Casio Freak

  • Members
  • PipPipPipPip
  • 264 posts
  • Gender:Male
  • Location:Hong Kong
  • Interests:FPS games, C.Basic

  • Calculators:
    fx-50FHII (2019/1/30)
    fx-991ESPLUS-2 (2023/12/22)
    fx-3650PII (2022/1/15)
    fx-9750GIII (2020/6/13)
    fx-9860G Slim (2024/2/27)
    fx-9860GIISD (2023/3/27)
    fx-9860GIISD-2 (2024/2/5)
    fx-CG20CN (2023/2/12)
    fx-CG50 (2023/10/23)

Posted 18 January 2020 - 05:18 PM

Hi sentaro21

 

I've post a thread about C.Basic to this "forum" (well, it is forum-like but not a forum): https://tieba.baidu....kw=计算器&ie=utf-8

https://tieba.baidu.com/p/6455559676

 

I hope more people there will know C.Basic. ;)

 

Cheers

CalcLoverHK


Edited by CalcLoverHK, 21 January 2020 - 07:47 PM.

  • diaowinner likes this

#566 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 19 January 2020 - 04:54 AM

Thank you very much!!
I'm always grateful for your contribution. :D


#567 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 24 January 2020 - 11:32 AM

Hers is new updated version. ^_^
 
2.44 beta6  for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
 
1.44 beta6 for CG10/20/50/Graph90+E.
---Common update---
-Fixed the bug that Pict file could not be saved to storage/SD. (this is 2.28 en-bug.)
-Changed spacification of the number of string variables by default to th increased to 999 by default .
 
-Fixed the bug that when the index start value of the matrix is 0, one more than the number set by '#Str '#Fn etc. is allocated.
-Fixed the bug that switching of current folder in setup.
-Fixed the number of digits including decimals to be no more than 16 when specifying Fix.
 
-Changed the specification to be possible use formulas by arguments as '#Str and '#Fn etc.
(Example) #Str <r>, N+1, A*10
 
-Fixed the bug that the return value was wrong when searching files with the wildcard in IsExist(.
(Example) IsExist ("*.Bmp")
If the file exists, return value is the number of files.
If the file does not exist, return value is 0.
 
-Added push OPTNVARS key to display alias/extended variable information in the variable display screen.
-Improved the save destination selection screen when the file name has been modified.
-Added Shift+F1F2F3 key to matrix/List/Vct selection.
-Fixed the bug that "%" could not be input with Alpha+[(-)] when one line input mode.
-Improved the version pop-up display that added build no.
-Improved the manuals. ( "Initialization of String" and "Display: Fix / Sci / Nrm / Eng" section) ( English translation supported by Krtyski )

Edited by sentaro21, 24 January 2020 - 11:34 AM.

  • CalcLoverHK and Hlib2 like this

#568 piu58

piu58

    Casio Freak

  • Members
  • PipPipPipPip
  • 147 posts
  • Gender:Male

  • Calculators:
    Casio Graph 90+E, Casio fx-CG20

Posted 25 January 2020 - 05:43 PM

That is quite a much of improvement, thank you!



#569 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 26 January 2020 - 10:28 AM

Thank you always too! :D

 

I hope there are no new en bugs,
If there is any minor bug fixed update again, the build number will increase. ^_^


#570 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 10 February 2020 - 08:52 AM

Here is new updaed version. :)
This update includes minor bug fixes, improved function icon display, and slightly improved matrix screen. ^_^
 
2.45 beta  for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
-Improved the option of the FkeyMenu( command.
(Format)FKeyMenu( n[~m], "string"/Icon # [,C/M/m/N/R/I/S/L] )
  - 3rd or later arguments can be omitted.
  - "," are required even if the argument is omitted.
(The order of the 3rd argument is arbitrary.)
  C: clear icon.
  M: masked icon.
  m: masked only frame icon .
  N: normal white icon.(default)
  R: black icon with notch at the bottom right.
  I: black icon with no notch at the bottom right.
  S: white box icon with no notch at the lower right indicating the selected.
  L: expand the "string" display area by 2 dots left.
(example) FKeyMenu (1, "string")
(example) FKeyMenu (2~3, "longstring",R)
(example) FKeyMenu (4~5, "longstring",I)
 
 
1.45 beta for CG10/20/50/Graph90+E.
-Improved the option of the FkeyMenu( command.
(Format)FKeyMenu( n[~m], "string"/Icon # [,C/M/N/R/I/S/U/L [,FKey icon color [,Fkey back color]]]] )
  - 3rd or later arguments can be omitted.
  - "," are required even if the argument is omitted.
  - Default color of FKey icon is black and FKey back color is white.
(The order of the 3rd argument is arbitrary.)
  C: clear icon.
  M: mased icon.
  N: normal white icon.(default)
  R: black icon with notch at the bottom right.
  I: black icon with no notch at the bottom right.
  S: black icon with no notch at the lower right indicating the selected.
  U: display 1 dot upper.
  L: expand the "string" display area by 2 dots left.
(example) FKeyMenu (1, "string",,Blue )
(example) FKeyMenu (2~3, "string",R,RGB(255,0,0))
(example) FKeyMenu (4~5, "string",R,Red ,Yellow )
 
-Changed to automatically set "C.Basic" mode when entering GB/JIS screen of CHAR screen.
-Changed to display the size of the free area in the status area when Shift is pressed in the editor.
 
-Fixed the bug that "Default Font" and "C.Basic Font" of VARS were reversed in [0](HELP) of [CHAR] screen.
-The system manager for C.Basic made by Colon has been updated from 1.2 to 1.3.
-Changed the BackLight command to disabled in the emulator.
-Changed INT%,DBL#,CPLX in variable page and color picker icons(RGB/HSL/HSV) to selected icons.
 
---common update---
-Added the strings sort of SortA/SortD command.
(format) SortA($Mat A)
-Updated Manuals.
-Added emulator judgment to System () command.
(Format) System (-7)
0 is returned on the real calculator.
1 is returned on the emulator.
-Improved the matrix list screen that newly supported the display of extended area Mat/List/Vct after 53.
[←]:backword
  [→]:forward
-Changed to display the size of the free area in the status line when Shift is pressed in the editor.
-Fixed the bug in DBL# mode where pauses and imaginary numbers were displayed in variables page.
-Improved variables page independently for INT%, DBL# and CPLX.
-Added sample program of System() command by Krtyski.(C.Basic_sample\System_sample)
-Added sample program of FKeyMenu() command by Krtyski & CalcLoverHK & Colon.(C.Basic_sample\FKeyMenu_sample)
 

Edited by sentaro21, 11 February 2020 - 03:17 AM.


#571 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 22 February 2020 - 05:02 PM

Hi, Sentaro! I have some ideas about C.BASIC. Probably, I didn`t examine the Manual_EN.txt very carefully, and half of my questions are irrelevant.
1) in programming mode, in the FMEM option, it would be very nice to have the same softmenu as in the native CASIO-BASIC:[STO] [RCL] [fn] [SEE], not just the single [fn] as in C.BASIC. Since any set of characters can be written in fn, it is sometimes convenient to use these fn as ready-made templates when writing various repetitive constructs using the [SEE] and [RCL] commands.
2) the commands fn and Str_ behave similarly in most cases. Example:
?➝Str 1:?➝fn1:Str 1➝fn3
Disp Str 1:Disp fn1
Disp Str 1+fn1:Disp Exp(Str 1+fn1)
Could you add commands like fn1➝Str 1 and fn1+Str 3➝Str 1 so that they don`t produce Syntax ERROR?
3) working with flags. In my opinion, these features are needed in C.BASIC. Even in such simple calculators as TI-83plus, these functions have been added to some libraries and programs. It turned out no worse than in HP calculators. The BatLib app for TI-83 has the dim(33 (FlagWrite) command. For example, dim(33,69,4) means: in group number 4 (graph settings), set the Dot, Sequential, GridOn, Rectangular, CoordOn, AxisOn, and LabelOn flags.
That is, d69=b1000101, and each of the seven positions in the binary number is responsible for the state of a particular flag in the group. It`s a bit complicated, but very effective. In C. BASIC, I suggest relevance at least two system variables StoFlags and RclFlags to quickly return to the original settings after changing them in some program.
4) suppose the program requests Input data?. I must enter either a vector [[1,2,3]] or a list {5,6,7} or a function a×x^2+b×x or a matrix or text. How can the program save the entered information correctly? It seems to me that in C.BASIC it is necessary to have one universal variable (UVar) for such cases. Pseudocode:
"Input data"?➝UVar:UVarType➝T
....... .......
If T=2:Then UVar➝_abc
........ ......
If T=5:Then UVar➝List 1
If T=8:Then UVar➝Str 1
....... .......
If T=0:Then UVar➝Str 1 //an undefined type or incorrect syntax
×+÷cos(ABC}} is treated as a String type

Edited by Hlib2, 22 February 2020 - 07:00 PM.


#572 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 24 February 2020 - 03:58 AM

Thank you very much for new ideas. :D
 

1) in programming mode, in the FMEM option, it would be very nice to have the same softmenu as in the native CASIO-BASIC:[STO] [RCL] [fn] [SEE],

I'll implement it in the next update.
 

2)Could you add commands like fn1➝Str 1 and fn1+Str 3➝Str 1 so that they don`t produce Syntax ERROR?

In C.Basic, fn is the same as Str, so there should be no error, but that is a bug.
I'll fix it.
 
To copy the formula memory fn and graph memory Y as strings,
Exp>Str () function can be used in the same way as genuine Casio Basic.
This is evaluated as a function fn(x), so I think this command exists. ^_^
Exp>Str (fn1, Str 1)
Exp>Str (fn1+Str 3, Str 1)

3) working with flags.

I'll try to incorporate it as an additional specification.
 

4) suppose the program requests Input data?.

I think that following syntax is easy to implement. ^_^
?→_abc,List 1,Str 1
VarType:Ans (1:_abc, 2:List 1, 3:Str 1)
 

 


Edited by sentaro21, 24 February 2020 - 05:17 AM.


#573 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 24 February 2020 - 09:27 PM

Hi, Sentaro! Thanks for the clarification. But I have some doubts about this and one more small question.
1) I see, in C.BASIC fn and Y functions evaluate in algebraic expressions, but in Disp and Locate output they behave as String variables and don`t evaluate unlike in genuine BASIC. It seems to me that they should evaluate everyplace as in genuine BASIC without additional command Exp(, because that is their main difference from String. Only in this case, the absence of the fn➝Str N command is quite logical, in my opinion.
2) Please, add [Y] [r] [Xt] [Yt] x to the VARS/GRPH menu option, if possible.
3) I checked the text LCD output speed in RefrshCtl DD:off and RefrshCtl DD:Grph 5/128 mode.
ClrText
For 1➝K To 50 Step 1
"1:ABCDEFGHIJKLMNOPQR"
"2:ABCDEFGHIJKLMNOPQR"
"3:ABCDEFGHIJKLMNOPQR"
"4:ABCDEFGHIJKLMNOPQR"
"5:ABCDEFGHIJKLMNOPQR"
"6:ABCDEFGHIJKLMNOPQR"
ClrText
"7:STUVWYZABCDEFGHIJK"
"8:STUVWYZABCDEFGHIJK"
"9:STUVWYZABCDEFGHIJK"
"10:STUVWYZABCDEFGHIJ"
"11:STUVWYZABCDEFGHIJ"
"12:STUVWYZABCDEFGHIJ"
Next
The speed in C.BASIC was three times slower than in native BASIC. In RefrshCtl DD:All 5/128 mode, text output works fine, i.e. much faster than in genuine BASIC. What is the meaning of RefrshCtl DD:off mode?

Edited by Hlib2, 24 February 2020 - 09:37 PM.


#574 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 25 February 2020 - 02:53 AM

Thanks! :D

1) I see, in C.BASIC fn and Y functions evaluate in algebraic expressions, but in Disp and Locate output they behave as String variables and don`t evaluate unlike in genuine BASIC. It seems to me that they should evaluate everyplace as in genuine BASIC without additional command Exp(, because that is their main difference from String. Only in this case, the absence of the fn➝Str N command is quite logical, in my opinion.

You are right!!
I'll fix them. ^_^
 

2) Please, add [Y] [r] [Xt] [Yt] x to the VARS/GRPH menu option, if possible.

Is it possible to substitute by increasing Y graph memory?
 

3) I checked the text LCD output speed in RefrshCtl DD:off and RefrshCtl DD:Grph 5/128 mode.

The speed in C.BASIC was three times slower than in native BASIC. In RefrshCtl DD:All 5/128 mode, text output works fine, i.e. much faster than in genuine BASIC. What is the meaning of RefrshCtl DD:off mode?

"RefrshCtl DD:off" is always transfers to the LCD at the end of the command.

The reason why the "" command was slow was that the transfer by each character occurred.
So it was slow.
Thanks for finding the bug. I will fix it. ^_^


#575 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 26 February 2020 - 02:07 AM

Here is new updated version. :)
I fixed the bug first.
Extension  will be added in the future update.
 
2.45 beta build09 for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
 -Fixed the bug that the execution speed of "" command was very slow.
 
1.45 beta build09 for CG10/20/50/Graph90+E.
 
(common update)
 -Improved the direct jump by pressed alphabet in file mode to two or more characters can be selected.
  DEL: back one character.
  AC/on: erase all.
 -Fixed the bug that an indent was added when EXE(CR) was performed before a command with the indent (If, Else ..).
 -Fixed the bug that function memory(Fn) and graph memory(Y) did not evaluate as a string when there was no argument.
 -Fixed the bug that the execution speed of "" command was very slow.

  • Hlib2 likes this

#576 CalcLoverHK

CalcLoverHK

    Casio Freak

  • Members
  • PipPipPipPip
  • 264 posts
  • Gender:Male
  • Location:Hong Kong
  • Interests:FPS games, C.Basic

  • Calculators:
    fx-50FHII (2019/1/30)
    fx-991ESPLUS-2 (2023/12/22)
    fx-3650PII (2022/1/15)
    fx-9750GIII (2020/6/13)
    fx-9860G Slim (2024/2/27)
    fx-9860GIISD (2023/3/27)
    fx-9860GIISD-2 (2024/2/5)
    fx-CG20CN (2023/2/12)
    fx-CG50 (2023/10/23)

Posted 26 February 2020 - 02:28 AM

For users, there are other changes that does not list above. (build 2,3,6) If you wish to look up, please read Manual_EN.txt and ManualCG_EN. ;)

 

And to clarify, 2.44 build 16 and 2.45 build 1 are the same version.


Edited by CalcLoverHK, 26 February 2020 - 02:29 AM.


#577 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 29 February 2020 - 06:59 PM

Without going into many others BASIC functions, I checked out some important ones that can be useful in various calculations. The following commands and examples do not work in v2.45beta_build_09.
G SelOn, G SelOff (they need for drawing selected graphics by DrawGraph),
T SelOn, T SelOff, DispF-Tbl, F Result (although ➝F Start, ➝F End and ➝F pitch works),
➝Xt1, ➝Yt1, Graph(x,y)=(Xt1,Yt1),
Graph=0.2X^2,[1,2] (but without [1,2] works).
In the next short program
3➝A
5➝B
Graph(X,Y)=(Xt1,Yt1)
after "Syntax ERROR" the cursor points wrong place in front of "3" (in most other cases error pointing does properly).

#578 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 01 March 2020 - 03:16 AM

Thanks! :D

I'll consider to fix it.



#579 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 07 March 2020 - 03:41 PM

Hi, Sentaro! Many thanks for the continuous improvement of CBASIC. The CASIOs now looks like a real math pocket computers. I have one small question: is it possible to implement the num-to-string function? This is really necessary in some programs. In ti-83_plus, for example, this is partially implemented in the OS with the LinReg(a+bx) command: LinReg(a+bx)_L1, L2, Y1: Equ►String(Y1, str1). In CASIO there is not ability to write system variables a,b to string or function as a numeric result. In ti-83 I can write this HEX-code directly on the calculator, like:
AsmPrgmEFD74A3A7884E61FC03E10EF ... etc ...
or to make this function on ti-83 BASIC, but in 9860gii CASIO-BASIC I can`t do it. Are you planning to add this feature to CBASIC?

Edited by Hlib2, 07 March 2020 - 03:43 PM.


#580 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 07 March 2020 - 11:45 PM

Hi, Sentaro! Many thanks for the continuous improvement of CBASIC. The CASIOs now looks like a real math pocket computers. I have one small question: is it possible to implement the num-to-string function? This is really necessary in some programs. In ti-83_plus, for example, this is partially implemented in the OS with the LinReg(a+bx) command: LinReg(a+bx)_L1, L2, Y1: Equ►String(Y1, str1). In CASIO there is not ability to write system variables a,b to string or function as a numeric result. In ti-83 I can write this HEX-code directly on the calculator, like:

AsmPrgmEFD74A3A7884E61FC03E10EF ... etc ...
or to make this function on ti-83 BASIC, but in 9860gii CASIO-BASIC I can`t do it. Are you planning to add this feature to CBASIC?

 

 

Thanks always! :D
 

Is it different from ToStr()?
ToStr(123.456)→Str 1
Shift-VARS(PRGM)-F6(>)-F6(>)-F3(ExStr)-F2(ToStr)

Edited by sentaro21, 07 March 2020 - 11:46 PM.


#581 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 08 March 2020 - 09:06 AM

Yes, the toStr( command is exactly what I meant, everything works fine with REAL/CPLX formats. Thank you very much!

#582 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 08 March 2020 - 09:19 AM

 

Yes, the toStr( command is exactly what I meant, everything works fine with REAL/CPLX formats. Thank you very much!

 

That is good!! :D
 
 
Here is new updated version.  ^_^
Currently, I'm implementing the graph function that is compatible with genuine Basic Casio, but it will be completed a bit later.
 
2.45 beta build13 for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
-Fixed the bug that the execution speed of "" command was very slow.
 
1.45 beta build13 for CG10/20/50/Graph90+E.
(common update)
(build13) 2020.3.8
-Changed the specification of Function memory(Fn) and graph memory(Y) that are evaluated as formula evaluation by default, 
and are evaluated as strings when as an argument of the string function or following strings.
(formula evaluation)
  Fn1 -> A
  Fn1(123)-> A
  Locate 1,1,fn1
  Text 1,1,fn1(123)
(string evaluation)
  "123"+fn1 -> Str 1
  Fn2 -> Str 2
  StrJoin(fn1, Str 1)
 
-Fixed the bug in copying from different types of strings variable.
(Example not copied to fn3)
  ClrMat
  "123" -> fn1
  "ABC" -> Str 1
  Str 1 -> fn3
 
-Added the function of Store/Recall/ SEE of function memory(Fn).
(*  For the editor the clipboard are stored to fn. For single line input, the entire line is stored.)
-Changed F_Start / F_End / F_pitch to independent variables.
-Fixed the ? command bug that decode to ASCII code when strings is displayed.
 
 
(build12.) 2020.3.4
-Changed the max specification of GraphY / fn to same as Str.
-Changed the store specification of GraphY to 6 byte prefix added.
(There is no change other than direct access to the Mat.)
 
-Fixed the bug that no updated file list when change file-mode by setup in the editor.
-Changed to masked icon when no function in the setup.
-Added the System() command option that get C.Basic system file that saved in main memory.
(*The index start value is 0.)
(example) System(10000,1)
  @CBASIC/Cbasic -> ListAns
(example) System(10000,1)
  @CBASIC/Cbasic2 -> ListAns
 
(build11) 2020.3.1
-Fixed the bug that the coordinates were shifted by 2 dots when using Screen# in CG mode.
-Fixed the bug that an error occured when continuous execution of Screen#/Screen%.
-Fixed the bug that the value is invalid when store List Ans of Screen#/Screen%.
(example) Screen#0,0→List Ans
-Improved the search mode in file mode.
  Press the alphabet key to open the search window and enter search mode.
  In the search window, normal input is possible.
  Press EXIT to cancel the search window.
  Cursor up and down, EXE, F1(EXE), F2(EDIT), F3(NEW) key can be worked without closing the search window.
 
(build10) 2020.2.28
-Fixed alpha-mode in file mode / editor.
-Improved the direct jump by pressed alphabet in file mode to number or small alphabet character can be selected.
F4(A<>a)
F5(CHAR)
F6(→) change to search folder/file.
DEL: back one character.
AC/on: erase all.
EXIT: return.
[X^2]:~ or ^
[^]:'
[(-)]:@
 

 



#583 diaowinner

diaowinner

    Newbie

  • Members
  • Pip
  • 8 posts

  • Calculators:
    CASIO fx-991CN X

Posted 08 March 2020 - 02:39 PM

Hi sentaro21

 

I've post a thread about C.Basic to this "forum" (well, it is forum-like but not a forum): https://tieba.baidu....kw=计算器&ie=utf-8

https://tieba.baidu.com/p/6455559676

 

I hope more people there will know C.Basic. ;)

 

Cheers

CalcLoverHK

 

It's 百度贴吧! I saw this.



#584 CalcLoverHK

CalcLoverHK

    Casio Freak

  • Members
  • PipPipPipPip
  • 264 posts
  • Gender:Male
  • Location:Hong Kong
  • Interests:FPS games, C.Basic

  • Calculators:
    fx-50FHII (2019/1/30)
    fx-991ESPLUS-2 (2023/12/22)
    fx-3650PII (2022/1/15)
    fx-9750GIII (2020/6/13)
    fx-9860G Slim (2024/2/27)
    fx-9860GIISD (2023/3/27)
    fx-9860GIISD-2 (2024/2/5)
    fx-CG20CN (2023/2/12)
    fx-CG50 (2023/10/23)

Posted 08 March 2020 - 04:08 PM

Hi diaowinner

 

It's 百度贴吧! I saw this.

 

Yes, this is Baidu Tieba, but unfortunately there are not as many people as in CnCalc interested in this. (^^;

 

Cheers

CalcLoverHK



#585 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 10 March 2020 - 02:55 AM

There was a bug remained that the function menu returned to the default by Store/Recall of function memory(Fn) in the editor.
Please download build13 again. :bow:


#586 diaowinner

diaowinner

    Newbie

  • Members
  • Pip
  • 8 posts

  • Calculators:
    CASIO fx-991CN X

Posted 10 March 2020 - 03:05 PM

Hi diaowinner

 

 

Yes, this is Baidu Tieba, but unfortunately there are not as many people as in CnCalc interested in this. (^^;

 

Cheers

CalcLoverHK

Right. It because you send it to “计算器吧”, but this “吧” is not popular than “fx-es(ms)吧”.

(Tips:the “fx-es(ms)吧” is more like "cnCalc" because “fx-es(ms)吧”'s friends do this “cnCalc”.)



#587 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 10 March 2020 - 06:38 PM

@Sentaro
It's a very difficult job to implement each new feature. Thanks again for STO/RCL/fn/SEE. As for DispF-Tbl, I didn't mean for CBASIC to fully copy from genuine-BASIC. All we need to do is calculate the parameters and create the matrixAns variable (i.e. DispF-Tbl) as a ready-made table of results stored to matrix type.

Edited by Hlib2, 10 March 2020 - 06:43 PM.


#588 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 11 March 2020 - 03:33 AM

Thanks! :D

I'll start with features that are easy to implement. ^_^
 
BTW,
Did DispF-Tbl get the same result by Seq() command?
Deg
"sin X"->GraphY1
"cos X"->GraphY2
1->F Start
5->F End
1->F pitch
DispF-Tbl
  ↓
Deg
"sin X"->GraphY1
"cos X"->GraphY2
1->F Start
5->F End
1->F pitch
Seq(X,X,F Start,F End,F pitch)->List 1
Seq(GraphY1,X,F Start,F End,F pitch)->List 2
Seq(GraphY2,X,F Start,F End,F pitch)->List 3
List->Mat(1,2,3)
 


#589 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 11 March 2020 - 06:12 PM

Obviously, CBASIC allows you to write any algorithm as a replacement for any function. However, there are many nuances and possible bugs. 2020/03, 13...14 I will be able to answer about the DispF-Tbl function.

#590 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 12 March 2020 - 12:37 AM

Do you know the details of DispF-Tbl function?
 
I’ll implement it as soon as I know the details of the DispF-Tbl function. ^_^


#591 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 14 March 2020 - 12:51 PM

Here is little update for the function of the function memory(Fn). :)
 
2.45 beta build14 for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
 
1.45 beta build14 for CG10/20/50/Graph90+E.
(common update)
-Added F5(Edit) function of the SEE of function memory(Fn).
-Fixed the function of Store/Recall/ SEE of function memory(Fn).

  • Hlib2 likes this

#592 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 14 March 2020 - 05:34 PM

Hi, Sentaro! In this example I tried to explain what characteristics of the DispF-Tbl function could be applied in CBASIC.
{9,3}➝Dim Mat A
For 1➝I To 9
For 1➝J To 3
10×I +J➝Mat A[I,J]
Next:Next:Mat A◢
// The matrix of integers with 9 rows × 3 columns for further manipulations
T SelOff :VarRange
// Here we define an independent parameter
// using F_Start, F_End, F_pitch
1➝F Start:9➝F End
1➝F pitch
"(Mat A[X,1]-X^2)"➝fn1
"fn1"➝Y1
// A strange feature in the AFX~9860 series.
// The DispF-Tbl function does not allow you to directly use matrix variables
// in Y variables, so we have to do it via fn.
// Very uncomfortable. Could You fix this in CBASIC?
"Mat A[X,2]÷(MOD(Mat A[X,2],3)=0)"➝fn2
"fn2"➝Y2
// From column 2 of matrix A we select only those numbers
// that are evenly divisible by 3
"Mat A[X,3]"➝fn3
"fn3"➝Y3
DispF-Tbl◢
// Those results we weed out, in the table DispF-Tbl are replaced with ERROR
29870341_m.jpg
F Result➝Mat B◢
// The F_Result matrix includes only those rows that do not contain mathematical errors.
// In this way, we can filter results according to the specified criteria
29870366_m.jpg
Mat➝List(B,1)➝List 1
VarList 1
// Here we define an independent parameter using the List_1
T SelOff :T SelOn 2
// The T_SelOn, T_SelOff settings in Table mode do not affect
// the G_SelOn, G_SelOff settings in Graph mode, and vice versa
DispF-Tbl
F Result➝Mat C
29870375_m.jpg

Edited by Hlib2, 14 March 2020 - 05:52 PM.


#593 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 15 March 2020 - 05:26 AM

Thank you very much for the detailed description! :D
I'll try to implement it.
 
// A strange feature in the AFX~9860 series.
// The DispF-Tbl function does not allow you to directly use matrix variables
// in Y variables, so we have to do it via fn.
// Very uncomfortable. Could You fix this in CBASIC?
 
Ok!
I'll improve it for ease of use. :)
 


#594 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 29 March 2020 - 07:46 PM

Hi, Sentaro! I can`t stop admiring your CBASIC app, especially its speed. I recently compared the two latest versions on two calculators, and I want to share the results. Also, I have some questions. For convenience I will label them as follows: v2.44beta build 6 - V1 and v2.45beta build 15 - V2. The following settings were set for certainty:
Angle:_Rad
Setup Recover:_on Max Mem Mode:_off
Use Hidn RAM:_on Hidn RAM Init:_on
Max List 52×1:_(52) Exec Time Dsp:_on
Mat Dsp:_m,n Storage mode:_S.Mem
Refrsh Ctl DD:_All 5/128 Execute mode:_DBL#
In V2, after running the program, the cursor is placed at the end of the text (in edit mode). In V1 the cursor does not change position after the program is executed, and this is much more convenient for multiple edits of the text, when you do not have to search for the old place each time to correct.
In V2, when viewing the CPLX matrix, scrolling is 20% slower than in the V1.
In both versions:
- the ClrMat_ command deletes all Lists in addition to Matrices;
- If you set Max Mem mode:_on, then the message File Reading..... always starts appearing even if you exit from text viewing mode without any editing. I don`t know if this is right.
In the V2 the speed of performing certain operations is noticeably reduced compared to the V1.
Below I give the results in DBL# mode as the number of operations per second
for different commands. In tests, I used 500row×1col lists, 500row×3col matrices,
and the expression
2×sin ((A+B)÷2)×cos ((A-B)÷2)
,
written in the functions Y5 and fn5.
1) List_2[K]➝List_3[K]
8500 times per sec.(V1)/8200 times per sec.(V2)
2) Mat_A[K,2]➝Mat_A[K,3] 11100/10400
3) Y5➝R
1200/570 times per second
calculates the expr.
2×sin ((A+B)÷2)×cos ((A-B)÷2)
. Amazingly!
4) 2×sin ((A+B)÷2)×cos ((A-B)÷2)➝R 880/750
At this point,
what is very strange is that the direct calculation of an expression
in v2.44build6 is much slower than the calculation via the "Y" function, (1200 vs 880).
5) fn5(K)➝R 780/680
6) For ... Next 37000/33500
7) Y5(K)➝R 1125/625
8) S+1÷K➝S 3500/3500
That`s all I noticed. In other modes and functions, the speed discrepancy is minimal, so I don`t give all the results.

Edited by Hlib2, 29 March 2020 - 08:33 PM.


#595 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 30 March 2020 - 05:59 AM

Thank you very much for the detailed verification! :D
 
I think that the current 2.45 version is slower than the previous version because the execution speed is not fully optimized because new commands are being implemented.
 
Since the SDK only supports SH3, the execution speed of SH4A changes up to 20-40% for each build.
Some commands are faster and others are slower.
 
I think that it can be solved by speed optimization, but there is no guarantee that it will be faster because it changes every time.
If the new features and existing bugs are not affected, we hope you choose the faster build version to use. ^_^
 
 

- the ClrMat_ command deletes all Lists in addition to Matrices;

List is implemented using Mat, so in C.Basic it has been specification.
 

- If you set Max Mem mode:_on, then the message File Reading..... always starts appearing even if you exit from text viewing mode without any editing. I don`t know if this is right.

Since the file information area is also released, it is necessary to read the file information every time.
This is the setting for the early 9860G with less memory.
Please always turn it off on G2 models or later as it has no effect. ^_^
 
 
3) Y5➝R
1200/570 times per second

 

C.Basic has a mechanism that can be operated at a higher speed by using binary operation.
For fn function, speedup by binary operation was more effective than before, but GraphY function was not. Currently, GraphY also employs binary operations.
As a result, all formulas can be optimized for speed by making them binary operation. :)
2×sin ((A+B)÷2)×cos ((A-B)÷2). 
   ↓
2×(sin ((A+B)÷2)×cos ((A-B)÷2))). 
 


#596 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 31 March 2020 - 09:13 PM

@Sentaro
Thank you for the hint regarding binary calculations. I tested this method in versions v2. 44/6 and v2. 45/15 on the 9860gii-2 calculator and measured the calculation speed in a loop for different expressions:
1) expression➝R
2) Y5➝R
3) Y5(K)➝R
4) fn5➝R
5) fn5(K)➝R
Also, I wrote the expression in functions in two ways
(expr) and (expr))
and received five different results in twenty experiments (5 examples × 2 variants × 2 versions):
a) ( -- ) slowdown 5...25%
b) (++) speedup 25...45%
c) ( -- )) slowdown 5%
d) ( ++ )) speedup 0...45%
e) (...)) syntax error
Functions like Y in v2. 44/6 are set to maximum speed by default, and adding extra brackets to the expression slows down calculations.
In v2. 45/15, in functions 3) and 5), ( # # # ) gives the minimum speed,
and ( # # # )) gives the maximum speed.
I hope this information can be useful.

Edited by Hlib2, 31 March 2020 - 09:16 PM.


#597 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 01 April 2020 - 07:39 AM

Thank again for the very helpful result. :D
 
If you don't mind, could you create a benchmark program?
 
Here's a sample.
You can replace the benchmark of this sample program. ^_^
 
"Bench  (C.Basic "+ToStr(Int (Version/100))+"."+ToStr(MOD(Version,100))+")"

Rad
"2*_sin _((A+B)/2)*_cos _((A+B)/2)"->fn5
"2*(_sin _((A+B)/2)*_cos _((A+B)/2)"->fn6
"2*_sin _((A+B)/2)*_cos _((A+B)/2)"->GraphY5
"2*(_sin _((A+B)/2)*_cos _((A+B)/2)"->GraphY6

Gosub A
Gosub B
Gosub C
Gosub D
Gosub E
Gosub F
Gosub G
Stop


Lbl A
"Loop"->Str 1
0->S:0->Ticks
Do
  Isz S
LpWhile Ticks<128
Gosub S
Return 

Lbl B
"Expression"->Str 1
0->S:0->Ticks
Do
  2*sin ((A+B)/2)*cos ((A+B)/2)->R
  Isz S
LpWhile Ticks<128
Gosub S
Return 

Lbl C
"(Expression)"->Str 1
0->S:0->Ticks
Do
  2*(sin ((A+B)/2)*cos ((A+B)/2)->R
  Isz S
LpWhile Ticks<128
Gosub S
Return 

Lbl D
"_GraphY_5"->Str 1
0->S:0->Ticks
Do
  GraphY5->R
  Isz S
LpWhile Ticks<128
Gosub S
Return 

Lbl E
"(_GraphY_6)"->Str 1
0->S:0->Ticks
Do
  GraphY6->R
  Isz S
LpWhile Ticks<128
Gosub S
Return 

Lbl F
"fn5"->Str 1
0->S:0->Ticks
Do
  fn5->R
  Isz S
LpWhile Ticks<128
Gosub S
Return 

Lbl G
"(fn6)"->Str 1
0->S:0->Ticks
Do
  fn6->R
  Isz S
LpWhile Ticks<128
Gosub S
Return 


Lbl S
StrLeft(Str 1+"               ",15)+StrRight("     "+ToStr(S),5
Return 

 



#598 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 01 April 2020 - 06:17 PM

If you don`t mind, could you create a benchmark program?


It`s an interesting thought! The test program will greatly simplify the verification and comparison procedure. As source constants, we could take the best results from the last two versions, for example, and output relative changes of ± % in any other version, as well as absolute speed values. I will try to write a test at the end of the week.

#599 Hlib2

Hlib2

    Casio Freak

  • Members
  • PipPipPipPip
  • 142 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860GII-2
    graph-100+
    fx-991DE_X
    ti-89_Titanium
    ti-voyage200
    ti-84+SE

Posted 10 April 2020 - 09:19 AM

Unfortunately, I was unable to complete the "Bench for C. Basic" program on time due to a lack of understanding some features of C. Basic. These ones don`t show up in individual test blocks, but when blocks are placed in the program, unexpected failures sometimes occur.
@Sentaro
I have a few questions about v2. 45.
1) When working with multiple matrices in program, they sometimes change the specification (m,n)↔(x,y). Columns and rows are swapped, which causes a Dimension ERROR message or an incorrect result.
2) When accessing subroutines like
Gosub X, P, T, 2, Y: ... Lbl X: Local a, b, c, d: ... writing local parameters is often ignored, leaving them equal to zero.
3) After handling with arrays in program, the list of variables displays Lst θ [byte] or Mat θ [byte] size of 2×256. Is this a mistake, or should it be?
4) The List_1+i×List_2➝List_5 operation is not working. `#CBcplx:10➝DimList_5 (for example) doesn`t help. But creating an array in the loop :For ... List_1[K]+i×List_2[K]➝List_5[K] ... Next: works well.
5) Seq(X,X,1,3,0.02) or Seq(X,X,1,1.2,0.05) operation loses the last element of the array, stopping at the value 2.95 or 1.15. This is probably due to rounding a number in the binary representation?
6)
-(2^32)+2×(2^15) ➝Ticks%
While Ticks%<-(2^15):WhileEnd
Disp Ticks%
The answer is -32720, Execute Time = 1.0219 s.
When storing, Ticks% change the sign of the argument, but returns the argument without changing the sign.
So, -(2^32)+2×2^15 = -(2×2^15)?

In the benchmark, I decided to make several pages of 8 points (tests) each. The main menu allows you to scroll through pages bу▼◄ ► buttons and quickly evaluate the results
30153753_m.jpg
For detailed information, we can select an item using the 1 ... 8 keys and scroll through the items in the information list. The tests are compared with benchmarks that we use as constants. "1.25 -" means 1.25 times slower, "1.51 +" means 1.51 times faster.
30153771_m.jpg
30153781_m.jpg
The last couple of pages I plan to use to check standard algorithms for errors in a particular version. I think this approach will make it easier to learn C.Basic.

#600 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 369 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 10 April 2020 - 01:04 PM

Thank you very much! :D
The benchmark program that you created is much better than expected. :D
 

1) When working with multiple matrices in program, they sometimes change the specification (m,n)↔(x,y). Columns and rows are swapped, which causes a Dimension ERROR message or an incorrect result.

That switching is only a difference on the matrix display, so it doesn't really affect it.
 

2) When accessing subroutines like

Gosub X, P, T, 2, Y: ... Lbl X: Local a, b, c, d: ... writing local parameters is often ignored, leaving them equal to zero.

 

The Local command in a single program is assigned to the same variable in all its subroutine calls.
Local a,b,c
Gosub A,1,2,3
Gosub B,1,2,3
Stop
 
Lbl A
Disp a,b,c
Return
 
Lbl B
Dsip a+b+c
Return
Result is
1
2
3
6
 
 

3) After handling with arrays in program, the list of variables displays Lst θ [byte] or Mat θ [byte] size of 2×256. Is this a mistake, or should it be?

The matrices Θ and r and z are implicitly used as entities of GraphY and Str and fn.
 

4) The List_1+i×List_2➝List_5 operation is not working. `#CBcplx:10➝DimList_5 (for example) doesn`t help. But creating an array in the loop :For ... List_1[K]+i×List_2[K]➝List_5[K] ... Next: works well.

It's a fatal bug.
I'll fix it.
 

5) Seq(X,X,1,3,0.02) or Seq(X,X,1,1.2,0.05) operation loses the last element of the array, stopping at the value 2.95 or 1.15. This is probably due to rounding a number in the binary representation?

I think that's right.
I'm going to try to fix that.
Until that's done, Please increase the end value slightly.
 

When storing, Ticks% change the sign of the argument, but returns the argument without changing the sign.

So, -(2^32)+2×2^15 = -(2×2^15)?

 

This may be a bug.
 




Also tagged with one or more of these keywords: Casio Basic C.Basic

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users