Jump to content



Photo
* * * * * 4 votes

C.Basic - International Release

Casio Basic C.Basic

  • Please log in to reply
692 replies to this topic

#601 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 10 April 2020 - 09:57 PM

@Sentaro

......
The Local command in a single program is assigned to the same variable in all its subroutine calls.
.......

Thank You for your detailed response. I would like to clarify point 2) from my previous message. The command Gosub N, a, b,c that I read about in "Command Reference" is a wonderful function similar to calling a procedure in other programming languages. But I don`t fully understand it`s behavior:
1➝A:2➝B:3➝C:4➝D
Gosub A,A,B,C◢
ClrText
Gosub B,A,B,C,D◢
Stop
Lbl A
Local a,b,c
Disp "SubA",a+b+c
Disp a,b,c
Return
Lbl B
Local a,b,c,d
Disp "SubB",a+b+c+d
Disp a,b,c,d
Return
Results are:
SubA___SubB
_______6____________10
_______1_____________1
_______2_____________2
_______3_____________3
_____________________4
If you add a third Lbl_C subroutine in this fragment, the fourth parameter d stops working in the second Lbl_B subroutine:
1➝A:2➝B:3➝C:4➝D
Gosub A,A,B,C◢
ClrText
Gosub B,A,B,C,D◢
ClrText
Gosub C,A,B,C◢
Stop
Lbl A
Local a,b,c
Disp "SubA",a+b+c
Disp a,b,c
Return
Lbl B
Local a,b,c,d
Disp "SubB",a+b+c+d
Disp a,b,c,d
Return
Lbl C
Local a,b,c,
Disp "SubC",a^2+b^2+c^2
Disp a,b,c
Return
Results are:
SubA___SubB___SubC
_______6_____________6____________14
_______1_____________1____________1
_______2_____________2____________2
_______3_____________3____________3
_____________________0
If you now add a fourth parameter to the third subroutine ( Gosub C,A,B,C,D ... Lbl C:Local a,b,c,d ... ), the entire fragment will work correctly again:
SubA___SubB___SubC
_______6_____________10____________30
_______1______________1____________1
_______2______________2____________2
_______3______________3____________3
______________________4____________4
(tested in 9860gii(SH4) v2.45/15).
I wrote:

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.

In my case, not only the horizontal (vertical) image of the matrix does change in edit mode and in the "Setup", but the Trn Mat N➝Mat N function is really randomly executed in program. In the near future I will try to reproduce this behavior in a separate fragment.

#602 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 April 2020 - 04:09 AM

Thank You for your detailed response. I would like to clarify point 2) from my previous message. The command Gosub N, a, b,c that I read about in "Command Reference" is a wonderful function similar to calling a procedure in other programming languages. But I don`t fully understand it`s behavior:

I'm sorry for the confusing specifications.
 
Originally, the Local command was intended to be used within the subroutine invoked by the Prog command.
When used in the main routine, it can be used as the Gosub argument specification, but it is a common argument specification for all Gosub, not a so-called local variable.
If the program has multiple Local commands, the last Local command is valid.
 
Normally, you only need to specify the maximum number of arguments for each Gosub with the Local command at once.  ^_^
Note that the variables specified in Local command are common.
 
 

In my case, not only the horizontal (vertical) image of the matrix does change in edit mode and in the "Setup", but the Trn Mat N➝Mat N function is really randomly executed in program. In the near future I will try to reproduce this behavior in a separate fragment.

 
I'm waiting for that sample program. :)
 


#603 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 14 April 2020 - 05:34 PM

I have noticed that the scrolling of the content of #cplx matrices is extremely slow, four times slower than in original afx-2.0 and 9860gii. This reminds me of the solution the Mat_A^-1×Mat_B➝Mat_C in the fx-2.0 Algebra calculator. The speed of the program in the built-in function was equal to the speed of the program in casio-basic :-))

Edited by Hlib2, 14 April 2020 - 05:59 PM.


#604 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 April 2020 - 09:58 AM

Thanks. :D
It is a worrying discovery.
Could you give me a little more detail on the situation?


#605 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 April 2020 - 11:42 AM

Here is new build updated version. :D
This is a bug fix from the previous build15 and a fix for the bugs found so far.
The execution speed has been optimized a little. ^_^
 
 
2.45 beta build16 for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
-Added fx-9860GIII to the model judgment in System(-1).
  0:fx-9860G(SH3)
  1:fx-9860G Slim(SH3)
  2:fx-9860GII(SH3)
  3:fx-9860GII(SH4A)
  4:Graph35+EII(SH4A)
  5:fx-9860GIII(SH4A)
-The System() command sample program created by Krtyski was updated to the version for fx-9860GIII. (System_sample folder)
 
1.45 beta build16 for CG10/20/50/Graph90+E.
(common update)
-Improved auto-indenting function of Switch~Case~SwitchEnd.
-Fixed the bug in which a comment was made immediately after the If/ElseIf command, which was terminated when the next command was If.
-Fixed the bug that the program was terminated when the next command is "If" when a comment follows If/ElseIf.
-Fixed the bug in the assignment from a string variable to a string variable that was not assigned after intializing Mat.
(Example of not being copied)
    ClrMat
  "ABC"->Str 1
  Str 1->Str 3
-Fixed the Seq Command bug that the end value was not reached when the increment value was a number of decimal points.
-Fixed the bug that infinite loop occurs when imaginary numbers are used in non-CPLX mode. (build15 en-bug.)
-Fixed the bug of omitted multiplication. (build15 en-bug.)
 


#606 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 19 April 2020 - 09:15 PM

Hi, Sentaro!
I apologize for the long delay in responding. I tried to clarify the details in my test example, but found nothing new compared to what was obtained last week.
//displaying CPLX matrix
ClrMat
`#cplx
{8,8}➝Dim Mat A.C:Ran# 1
For 1➝C To 8 Step 1
For 1➝R To 8 Step 1
10Ran# +i×Ran# ➝Mat A[R,C]
Next:Next
Mat A
//displaying CPLX matrix from lists
ClrMat
`#cplx
For 1➝C To 8 Step 1
8➝Dim List C
Next:Ran# 1
For 1➝C To 8 Step 1
For 1➝R To 8 Step 1
10Ran# +i×Ran# ➝List C[R]
Next:Next
List➝Mat(1,2,3,4,5,6,7,8)
In both cases the screen will display equal arrays of random complex numbers. If you scroll through the resulting array from top to bottom in the left column, you will notice a strong slowdown (movement from the bottom up or in the right column is bit faster). No settings change this behavior.
2) Sometimes there is an arbitrary change in the Max List 52×: setting from 1_(52) to 6_(312).
3) Another feature.
3.1) I edit some program and return to the list of files.
3.2) Changing setting HidnRAM Init: from "on" to "off"
3.3) and running program, after finishing I press EXIT, EXIT, EXIT.
In most cases I get something like this:
30269030_m.jpg30269039_m.jpg
My folders have moved to the "Favorites" section, and this screen doesn`t disappear. The "Restart" button not always help, sometimes you have to manually delete the <@BASIC> file.
In general, C. BASIC is getting better and more stable with each new version.

#607 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 20 April 2020 - 08:27 AM

Thanks for bagu report! :D
 

In both cases the screen will display equal arrays of random complex numbers. If you scroll through the resulting array from top to bottom in the left column, you will notice a strong slowdown (movement from the bottom up or in the right column is bit faster). No settings change this behavior.

For complex numbers, the display speed was slowed down because the number-to-string conversion was increased by a factor of four due to formatting.
This fix may take some time. :bow:
 

2) Sometimes there is an arbitrary change in the Max List 52×: setting from 1_(52) to 6_(312).

Could you identify where this occurs?
 

3) Another feature.

3.1) I edit some program and return to the list of files.

3.2) Changing setting HidnRAM Init: from "on" to "off"
3.3) and running program, after finishing I press EXIT, EXIT, EXIT.
In most cases I get something like this:

A similar phenomenon was reproduced.

I'll fix it.


#608 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 20 April 2020 - 07:44 PM

@Sentaro21

Sometimes there is an arbitrary change in the Max List 52×: setting from 1_(52) to 6_(312).

 Could you identify where this occurs?

1) After the "restart" operation and starting the CBASIC application, we get Use_Hidn_RAM:_on and Max_List_52×:1_ (52).
2) when starting the app after deleting the <@CBASIC> folder (for forced crash recovery) or when setting up Use_Hidn_RAM:_on manually, we get Max_List_52×:6_(312). There is another option I can`t recall.
Also, when executing point 1) in version v.244/6, the Execute_mode parameter is set to DBL#, and in v.245/16 is set to CPLX.
Of course, these are insignificant details, but since You asked, I tried to describe the situation.

Edited by Hlib2, 20 April 2020 - 07:49 PM.


#609 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 21 April 2020 - 04:10 AM

Thnaks! :D



#610 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 April 2020 - 06:59 AM

Here is new build updated version. :)
 
2.45 beta build17 for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
-Fixed the bug that caused the ? command input to be in alpha mode at the start of the program. (build16 en-bug)
 
1.45 beta build17 for CG10/20/50/Graph90+E.
-Added to save/load 16-bit BMP of RGB565 format. and changed the default format to 16-bit BMP.
 
(common update)
-Fixed the bug that the matrix display of CPLX was too slow. and changed it from a three-column display to a four-column display.
-Fixed the bug in the initialization of hidden memory.


#611 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 26 April 2020 - 09:22 PM

Hi, Sentaro! Thank you for the permanent improvements to CBASIC. Unfortunately, there are a few minor bugs in the latest version of V. 245/17.
1) If there is an error in the program text, the application does not show the source code for editing.
2) when displaying the matrix, the option x, y↔m,n does not match the main settings.
3) it seems to me that the Use_Hidn_RAM:on option should be made constant for models with additional memory and removed from the settings.
4) in an array image, the graphic bracket in the last row removes one pixel in some digits.
30339236_m.jpg

#612 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 27 April 2020 - 10:21 AM

Thanks for the bug report. :D
 

1) If there is an error in the program text, the application does not show the source code for editing.

It can't be replicated.
I'll do a little more research.
 

2) when displaying the matrix, the option x, y↔m,n does not match the main settings.

It appears to have been reversed because I changed [m,n] to [→x,y] and [x,y] to [→m,n].
Would the previous view be better? ^_^
 

3) it seems to me that the Use_Hidn_RAM:on option should be made constant for models with additional memory and removed from the settings.

This setting cannot be fixed because it is required in the emulator.
I'll add a Yes/No pop-up.
 

4) in an array image, the graphic bracket in the last row removes one pixel in some digits.

This will be fixed in the next update. ^_^


#613 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 27 April 2020 - 05:21 PM

@Sentaro
1) the calculator reports: "Syntax ERROR Press:EXIT". Previously, I could enter the program text in a specific error location, but now the calculator returns a list of files after pressing EXIT. I tested it on two real 9860GII(SH4).
2)

Would the previous view be better?

I can`t see any strict logic here. The calculator interprets the elements of a two-dimensional array as [row, col]. For example, in the matrix editor this is displayed as a message [x,y]. But in the SetUp menu we see [m,n]. And vice versa. Why then do I need to configure SetUp if it is confusing and is changed by setting up the matrix editor? On the other hand, this feature does not matter in principle if it will never change.
--------
I really desire to return one edit option from v. 244, when the last cursor position in the program text in view/edit mode could saved even after the program was executed.

#614 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 28 April 2020 - 11:26 AM

Thanks! :D
 

1) the calculator reports: "Syntax ERROR Press:EXIT". Previously, I could enter the program text in a specific error location, but now the calculator returns a list of files after pressing EXIT. I tested it on two real 9860GII(SH4).

Is "Force Return" set to something other than "None" in your setup?
 

I can`t see any strict logic here. The calculator interprets the elements of a two-dimensional array as [row, col]. For example, in the matrix editor this is displayed as a message [x,y]. But in the SetUp menu we see [m,n]. And vice versa. Why then do I need to configure SetUp if it is confusing and is changed by setting up the matrix editor? On the other hand, this feature does not matter in principle if it will never change.

Ok!
I've reverted the display back to earlier. :P
The matrix display [m,n] and [x,y] allow you to choose the most convenient format when used as an array of XY coordinates.
This is more noticeable in the case of graphics bitmap patterns.
It's a display switch without changing the internal format,
so If you want to use it only as a matrix, I think you can fix [m,n].
 

I really desire to return one edit option from v. 244, when the last cursor position in the program text in view/edit mode could saved even after the program was executed.

Sorry, that was an en-bug. :bow:
The bug was not in the CG version, so I was late in noticing it.
 
Here is new bug fixes version. :)
 
2.45 beta build18 for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
-Fixed the bug that that the cursor position of the editor was reset after the program execution. (build12 en-bug)
 
1.45 beta build18 for CG10/20/50/Graph90+E.
 
(common update)
-Fixed the bug that the matrix display was erasing a part of the numbers at the bottom.
-Changed the specification to the confirmation pop-up will be shown for On/Off of the hidden memory in the set-up.
 


#615 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 28 April 2020 - 07:06 PM

@Sentaro

Is "Force Return" set to something other than "None" in your setup?

Yes, it is. I always kept Force Return:None But this time I didn`t pay attention to changing the settings when loading v2.45/17. Thank You so much for the tip!

I`ve reverted the display back to earlier.

The logic of this function has now become clear even for ordinary users :-)

Fixed the bug that that the cursor position of the editor was reset after the program execution.

Works perfectly now!

#616 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 29 April 2020 - 11:54 AM

I'm glad the bug seems to have been fixed. ^_^

By the way.
Do you have a benchmark program ready?


#617 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 30 April 2020 - 05:14 PM

I'm glad the bug seems to have been fixed. ^_^

By the way.
Do you have a benchmark program ready?

"Bench C. Basic" I have workable for personal use. For sharing, it is not ready yet. Since the "int" "dbl" "cplx" flags are not changed by the program in SetUp Menu, you have to change them manually for each mode. It is also not possible to check the status of some flags in the program to prevent incorrect results (or probably I haven`t fully studied the manual for C. Basic yet). There is a way to test the "int" "dbl" "cplx" mode indirectly by comparing the calculation speed of the reference example, and then add a menu like " Set mode: int - press 1... etc" or "Incorrect mode!". For the beta version, I will need about 10 days from now.

#618 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 May 2020 - 07:08 AM

Thanks! :D
 
Here is a sample program to benchmark by switching the operating mode.
 
I used this N queen benchmarking program. ^_^
 
Three types of programs are switched with INT%, DBL# and CPLX to run the benchmark.
 
T1: This program is compatible with Casio Basic.
T2: This is a program for C.Basic.
T3: This is a program that I optimized for C.Basic.
 
 
To switch modes in a program, Use these commands.
'#CBINT
'#CBDBL.
'#CBCPLX
 
However, in the current version it works well, 
but in the previous version, the switching of operation mode occurs even when searching labels, so countermeasures are needed for that.
a change of operation mode occurs at the time of the first label search, so a countermeasure is necessary.
 
The '#CBINT' in line 26 is required to work with the previous version.


#619 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 01 May 2020 - 08:22 AM

@Sentaro
I apologize for my mistake. Yesterday I wrote:

Since the "int" "dbl" "cplx" flags are not changed by the program in SetUp Menu, you have to change them manually for each mode.

I accidentally forgot about the correct syntax of a command like `#CBxxx and started using `#xxx, similar to commands like `#Break0, `#Mat_1. Thank you very much for the additional information! I should read the manual for C. Basic carefully again before continuing to program.

#620 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 03 May 2020 - 11:23 AM

Hi, Sentaro!
I downloaded Your sample and was impressed with the speed of the T3 program adapted for C. BASIC.
30394280_m.jpg
Since there was still space on the display, I added the T0 program to "8QueenBenchmark" sample. T0 was written by me for SRP-325G (hp-9g) in 2015, and is now adapted for Casio Basic. For those who are interested in C. BASIC, I present here the text of the "8QueenBenchmark" program that Sentaro wrote.
(T0 is compatible with genuine Casio Basic)
`#CBINT
ClrText
Locate 1,1,"8Queen Benchmark"
Locate 4,2,"(C.Basic Ver."+ToStr(Int (Version÷100))+"."+ToStr(MOD(Version,100))+")"
Locate 1,3,"_____INT%__DBL#__CPLX"
Locate 1,4,"T0"
Locate 1,5,"T1"
Locate 1,6,"T2"
Locate 1,7,"T3"
`#CBINT
5➝x
Gosub T
`#CBDBL
11➝x
Gosub T
`#CBCPLX
17➝x
Gosub T
Stop
`#CBINT //_#E690_required_compatibility
Lbl T
4➝y:0➝Ticks
Gosub E
Ticks➝S:Gosub S
5➝y:0➝Ticks
Gosub A
Ticks➝S:Gosub S
6➝y:0➝Ticks
Gosub C
7➝y:0➝Ticks
Gosub D
Ticks➝S:Gosub S
Return
Lbl S
Locate x,y,Sprintf("%4.3f",#S÷128)
Return
Lbl A //_Prog_T1
0➝A~Z:8➝R
{R,1}➝Dim Mat A
Do
Isz X
R➝Mat A[X,1]
Do
Isz S:X➝Y
While Y>1
Dsz Y
Mat A[X,1]-Mat A[Y,1]➝T
If T=0 Or X-Y=Abs T
Then 0➝Y
Mat A[X,1]-1➝Mat A[X,1]
While Mat A[X,1]=0
Dsz X
Mat A[X,1]-1➝Mat A[X,1]
WhileEnd
IfEnd
WhileEnd
LpWhile Y≠1
LpWhile X≠R
S
Return
Lbl C //_Prog_T2
0➝A~Z:8➝R
R➝Dim A
Lbl a:X=R=>Goto e
Isz X:R➝A[X]
Lbl b:Isz S:X➝Y
Lbl c:Dsz Y:Rad
Y=0=>Goto a
A[X]-A[Y]➝T
T=0=>Goto d
X-Y≠Abs T=>Goto c
Lbl d:Dsz A[X]:Goto b
Dsz X:Goto d
Lbl e:S
Return
Lbl D //_Prog_T3
0➝A~Z:8➝R
R➝Dim A
Lbl g:X=R=>Goto k
Isz X:R➝A[X]
Lbl h:Isz S:X➝Y
Lbl i:Dsz Y:Goto l:Goto g
Lbl l:A[X]-A[Y]➝T=>Goto m:Goto j
Lbl m:(X-Y)≠Abs T=>Goto i
Lbl j:Dsz A[X]:Goto h
Dsz X:Goto j
Lbl k:S
Return
Lbl E //_Prog_T0
0➝A~Z:8➝R
{R,1}➝Dim Mat A
For 1➝X To R Step 1
R➝Mat A[X,1]:Isz S
For X-1➝Y To 1 Step -1
Mat A[X,1]-Mat A[Y,1]➝T
If (T(X-Y-Abs T))=0
//_(T(X-Y-Abs T))_in C.BASIC_runs_faster,
//_then_T(X-Y-Abs T)
Then For X➝U To 1 Step -1
Mat A[U,1]-1➝Mat A[U,1]
If Mat A[U,1]>0
Then Isz S:X➝Y
Break
Else X-1➝X
If X=0
Then 1➝Y:Break
IfEnd:IfEnd:Next
IfEnd:Next:Next:S
Return
CB8Queen.g1m

Edited by Hlib2, 03 May 2020 - 11:37 AM.


#621 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 04 May 2020 - 05:29 AM

Thanks for adding the program! :D
It would be interesting to see the difference in speed between the programs. ^_^
The current version of CPLX is a little slower than the previous version because it is not optimized well yet.
 
I think my optimization version contains all the tips for speed optimization in C.Basic.
The most effective is a combination of simple formulas and simple commands (Lbl~Goto), just like assembler.
It is a sequential read interpreter that does not use P-code conversion, so complex expressions and structured commands are not fast enough.
These optimizations can make the program twice as fast as it normally is in exchange for reduced program readability.


#622 diaowinner

diaowinner

    Newbie

  • Members
  • Pip
  • 8 posts

  • Calculators:
    CASIO fx-991CN X

Posted 12 May 2020 - 06:51 AM

There is a problem that using C.Basic:

√√√-9

This function can did the C.Basic a "Ma Error", but PRGM function did not. :wacko:



#623 CalcLoverHK

CalcLoverHK

    Casio Freak

  • Members
  • PipPipPipPip
  • 257 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 12 May 2020 - 07:20 AM

@diaowinner:

Did you put #CBCPLX in the top of the program editor?



#624 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 May 2020 - 08:56 AM

There is a problem that using C.Basic:

√√√-9

This function can did the C.Basic a "Ma Error", but PRGM function did not. :wacko:

Please set to CPLX mode in the setup,
Or use the following command at the beginning of the program. :)
'#CBCPLX.
 
 
 
@CalcLoverHK
Thanks for quick help. ^_^
 


#625 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 12 May 2020 - 08:20 PM

I get different speeds in the following fragments (Execute mode:DBL#):
0➝S
While S<10^4
S+1➝S
WhileEnd:S
Result is:
10000
Execute Time= 7.7165
0➝S:10^4➝K
While S<K
S+1➝S
WhileEnd:S
Result is:
10000
Execute Time= 1.1649
0➝S:10^4➝K
While S<K+1
S+1➝S
WhileEnd:S
Result is:
10001
Execute Time= 2.7616
When I use the "Ticks%<" in loop parameter, this in some cases distorts the speed measurement in the benchmark.
This feature is worth noting.

Edited by Hlib2, 12 May 2020 - 09:30 PM.


#626 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 13 May 2020 - 05:16 AM

Thanks for the interesting validation. :D
 
In the While command, the conditional expression is evaluated each time.
One simple variable is the fastest in expression evaluation.
The Strings of numbers are converted to an internal format, so there is a cost.
 
For the benchmark loop, please use the For loop to evaluate the conditional expression first. ^_^


#627 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 21 May 2020 - 11:10 AM

Here is new bug fixes version. :)
 
2.45 beta build20 for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
    (build20)   2020.5.21
-Improved the French manual.(Many thanks to Lephenixnoir)
    (build19)   2020.5.20
        -Added fx-9750GIII to the model judgment in System(-1).
         0:fx-9860G(SH3)
          1:fx-9860G Slim(SH3)
          2:fx-9860GII(SH3)
          3:fx-9860GII(SH4A)
          4:Graph35+EII(SH4A)
          5:fx-9860GIII(SH4A)
          6:fx-9750GIII(SH4A)
        -The System() command sample program created by Krtyski was updated to the version for fx-9750GIII. (System_sample folder)
 
 
1.45 beta build20 for CG10/20/50/Graph90+E.
    (build20)   2020.5.21
        -Added the Graph90+E to System(-1) command
        (format) System(-1)
         return to CG10/20/50
         return value is 10 : CG10
         return value is 20 : CG20
         return value is 50 : CG50
         return value is 90 : Graph90+E
        -The System() command sample program created by Krtyski was updated to the version for Graph90+E. (System_sample folder)
 
 
(common update)
    (build20)   2020.5.21
        -Fixed the bug that the skip cache between If<False>~ElseIf did not work.
        -Added new option of System() command to get OS minor version.
        (format) System(-22)
    (build19)   2020.5.20
        -Fixed the bug that AC/on/AcBreak not work after escaping the loop with the Break command from within Try~TryEnd.
        -Changed the specification of the ReadGraph/WriteGraph/DotGet/DotPut command that it works on the current VRAM.
        -Added V option of the Screen command to change the drawing target VRAM to the retreat area of the text VRAM/graphics VRAM.
        (Format) Screen.V
       set to the default VRAM.
        (Format) Screen.VT
       Changes the retreat area of the text VRAM to a drawing.
        (Format) Screen.VG
       Changes the retreat area of the graphics VRAM to a drawing.

Edited by sentaro21, 21 May 2020 - 11:11 AM.


#628 CalcLoverHK

CalcLoverHK

    Casio Freak

  • Members
  • PipPipPipPip
  • 257 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 14 June 2020 - 03:41 AM

Hi sentaro21

 

I recently bought fx-9750GIII. Finally, I can test C.Basic in school! :greengrin: But now I can't install it because I don't have mini-B cable (the package doesn't include it :/) I have also planned to write a review about it in Planet-Casio.

 

Cheers

CalcLoverHK



#629 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 17 June 2020 - 10:58 AM

Hi CalcLoverHK,
Sorry for the late reply.
 
Congratulations on your getting of 9750GIII :D
The cable is mini-USB, which may be rare nowadays, but I'm sure you'll find that soon enough.
Enjoy programming in C.Basic to the fullest. ^_^
 


#630 CalcLoverHK

CalcLoverHK

    Casio Freak

  • Members
  • PipPipPipPip
  • 257 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 21 June 2020 - 09:09 AM

Hi sentaro21

Thank you! But I installed C.Basic and Ftune3 in school instead  :greengrin: 

And sorry! Because of my increasingly academic work (I can handle but need more time than before), I have no time to manage Casiopeia help center and stopped the update on that website (despite the high views, it has no replies other than me x_x, and the purpose of it is to be an alternative download only). From now on I will focus on cnCalc help center more. ^_^

Cheers
CalcLoverHK


Edited by CalcLoverHK, 21 June 2020 - 09:10 AM.


#631 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 June 2020 - 10:19 AM

Hi CalcLoverHK,
 
I always appreciate your enthusiastic support. :D
Academic works are the most important part of a student's job.
Narrowing down the scope of support is a wise choice.
I'm behind on my C.Basic updates right now, so I hope you can take your time. ^_^


#632 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 25 June 2020 - 07:02 PM

Hi, Sentaro21! Thank you so much for continuing to work on the C.Basic project. I am close to completing the "Bench C.Basic" program. There were new ideas, and I had to redo everything. In the current version of the interface, there are 6 pages (screens) with 8 test parameters in each, a total of 48 points. For mobile work, the user can vary the number of tests, so as not to waste time on unnecessary calculations. Each item is provided with a brief reference. Since I didn`t fully master C. Basic, I left about 20 of 48 items empty. In the future, any user can add their own tests at their own discretion.
When I started writing measurement procedures, I did a small test first and ran into a problem (v2.45 build 20).
first sample
0➝Ticks%:10^4➝K
`#CBint:While K:Dsz K:WhileEnd:`#CBdbl
Disp RndFix(#(Ticks%÷2^15),3)
second sample
0➝Ticks%:10^4➝K
`#CBdbl:While K:Dsz K:WhileEnd
Disp RndFix(#(Ticks%÷2^15),3)
If the Main SetUp parameter INT% or DBL# does not match the one in the sample, the loop is not executed. In this case, you can use the trick to launch the program, but only once. It is possible that this will work in the program body, but there is no complete certainty.
And one more question about operations with string variables.
`#Str A,3,5:["ABC","23+5","CD×6"]➝Mat A
Locate 1,2,$Mat A[1]
After executing this code, in another place I get:
"ABCD"➝Str 3 String Too Long
"ABC"➝Str 4 Argument ERROR
Then I try:
["ABCDE","23+5","CD×6","AB1","A"]➝Mat A
I get Mat A of greater dimension (5×6), but still have:
"ABCD"➝Str 3 String Too Long
"ABC"➝Str 4 Argument ERROR.
And the last question. When I need to copy a list of data into the program text, I use a fragment like:
RanList#(10)➝List 1
"{"➝Str 1:Dim List 1➝D
For 1➝K To D Step 1
Str 1 +ToStr(List 1[K])+","➝Str 1
Next
StrMid(Str 1,1,StrLen(Str1)-1)+"}"➝fn1
After that, I can manually copy the list from fn to the program text. Is there an easier way to do this in C. Basic?
Thanks!

#633 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 June 2020 - 12:52 PM

Hi HliB2,
Thanks for the news that "Bench C.Basic" program is close to completing. :D
 
First of all, 
The comment ends with a colon in the genuine Casio Basic, 
but in C.Basic, it ends at the end of the line.
 
Then, after #CBint is executed, the execution mode is integer mode.
In that case, the variable K means integer variable K%, so it won't work well because K% was not initialized during the first DBL mode.
 
The correct program is as follows

0➝Ticks%:10^4➝K%
`#CBint
While K:Dsz K:WhileEnd
`#CBdbl
Disp RndFix(#(Ticks%÷2^15),3)
 

`#Str A,3,5
The length of the available strings is one less than the length specified in the command.
This is a bug and will be fixed.
 
 


After that, I can manually copy the list from fn to the program text. Is there an easier way to do this in C. Basic?

With the Matrix/List displayed, you can press Shift+8(CLIP) to input data to the clipboard.
You can paste it in the editor. ^_^
 


#634 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 26 June 2020 - 05:53 PM

@Sentaro21
1) Thank You, I understand now.
This works in dbl# mode SetUp,
10^4➝K%
`#CBint
While K:K-1➝K:WhileEnd
and without % this works too:
`#CBint
10^4➝K
While K:K-1➝K:WhileEnd
We just need to follow some rules.
2) The problem with strings has not yet cleared up for me.
`#Str A,2,4
["123","XYZ45"]➝Mat A
Disp $Mat A [2]
result is XYZ45.
But the next code causes an error String Too Long:
`#Str A,2,4  //a
["123","XYZ45"]➝Mat A  //b
"123"➝$Mat A[2]
Disp $Mat A [2]
As you said, the length of the available strings is one less than the length specified in the command. I`m not considering this bug right now. The question is: the //a command sets a limit on the size of the string that we can write to the matrix A. This does not depend on the size of the matrix A that the //b command defines. (By the way, the size of Mat A is one more than specified by the //b command). Is this a rule in C.Basic, or is it a bug?
Let`s say I have allocated a memory area for standard strings in the calculator:
ClrMat r:{50,85}➝Dim Mat r.B
After executing `#Str A,2,4 I can`t write anything longer to the Str N than specified by `#Str. How can I cancel the action of the `#Str A,2,4 command?

Edited by Hlib2, 26 June 2020 - 06:16 PM.


#635 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 28 June 2020 - 08:20 AM

Sorry, I misunderstood the specification for setting the number of characters by #Str. :bow:
Set the number of available characters +1.
The reason for this is to add the last null characters of the string.
 
The matrix initialization process is not affected by the number of characters limit.
However, in the case of the assignment process, characters limit is encountered.
 
 

After executing `#Str A,2,4 I can`t write anything longer to the Str N than specified by `#Str. How can I cancel the action of the `#Str A,2,4 command?

Please reconfigure as follows. :)
'#Str A,20,256
 

Edited by sentaro21, 28 June 2020 - 08:21 AM.


#636 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 28 June 2020 - 03:36 PM

OK. After many attempts, I finally figured out the string operations in CBasic. Since this is a very important section of the programming language, let me share some clarification. This could be useful for those who use C.Basic.
5➝R
ClrText:" ":" ":" "
ClrMat A
{5,5}➝Dim Mat A.B
ClrMat D
`#Str D,3,10
"A2345678"➝$Mat A[R]
Locate 1,1,$Mat A[R]
"12345678"➝Str 3
Locate 1,2,Str 3
$Mat D[3]➝$Mat A[2]
Locate 1,3,$Mat A[2]
result is:
A23 //bug: must be A234
12345678 //due to bug we can not exceed string`s length setting minus 2.
123 //bug: must be 1234
By default, Str variables are stored in the Mat r array (row=127, col=256). The ` #Str D, 3, 10 command cancels Mat r storage and defines a new array to store Str variables: now it is Mat D (row=3, col=10). In any place, there is now a restriction for variables of type Str N: maxN=3, maxSize=9 characters.
Entries like Str 3➝$Mat A[1]
do not always work in the calculator
(from my experience).
Entries of the form $Mat D[3]➝$Mat A[1]
are executed normally.
If we will execute a fragment such as:
........
{5,5}➝Dim Mat A.B
`#Str A,15,10
........
then the rules become more confusing, so it is advisably not to make the names of matrix for standard strings and other matrices the same

Edited by Hlib2, 30 June 2020 - 09:03 PM.


#637 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 28 June 2020 - 05:47 PM

@Sentaro21
Would you be so kind as to consider my suggestions for the ListCmp( function?
1) ListCmp({1,2,3},2) returns 1.
The similar function Sum ({1,2,3}=2) does the same and in int% mode works twice as fast. It seems to me that ListCmp({1,2,3}, C) would better return 0 or the position number of the matching item in the list.
2) ListCmp({1,5,8,7,6},{5,8,7}) retuns 0. In this example, it would be more appropriate to get 2, since the list {5,8,7} is contained in the list {1,5,8,7,6} and starts from the second position. This does not contradict logic also in the case of matching lists: ListCmp({1,2,3},{1,2,3}). Result=1, since the list {1,2,3} is contained in the list {1,2,3} and starts from the first position.

Edited by Hlib2, 28 June 2020 - 06:40 PM.


#638 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 July 2020 - 09:10 AM

@Hlib2
Thank you for letting us know more about the status of the string length specification bug. :D
In CasioBasic, a single character is a multi-byte string containing two bytes of characters, so I think that the string processing was made with extra character margins to avoid complications.
I think it's possible to fix it, so I'll try to fix it in the next version. ^_^
 
and,
Thanks for the new suggestion to the ListComp command!
If it can evolve into a more useful command, I would like to incorporate it. ^_^


#639 Hlib2

Hlib2

    Casio Freak

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

  • Calculators:
    fx-9860GII-2,
    cfx-9850GC+,
    fx-9750G+, graph_100+,
    fx-9750GII, fx-991DE_X,
    ti-83+_SE, ti-84+, ti-85,
    ti-89_Titanium,
    ti-voyage200.

Posted 03 July 2020 - 06:20 PM


Hi, Sentaro21!
I would like to clarify the specifics of the loop operator in CBASIC (9860gii-2)
15➝L%
For 1➝K% To L% Step 1:Next
Disp K%
In genuine BASIC K=15, in CBASIC K=16.
Is it possible to switch between prefix increment and postfix increment? For example, the CITIZEN srp-325g calculator (or hp-9g) has the syntax FOR (K=1;K<=15;K++){ ... } or FOR (K=1;K<=15;++K) { ... }. Or can`t we change anything here?

Edited by Hlib2, 03 July 2020 - 06:32 PM.


#640 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 04 July 2020 - 08:03 AM

Hi Hlib2,
 
That's not a problem with DBL and CPLX,
so this is a bug only if use integer mode and integer variables. :banghead:
Thanks for finding the bug!
I'll fix it in the next update.
 
For pre-incrementing and post-incrementing, it would be nice if you could replace it with the While or Do loop. ^_^






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