Jump to content



Photo
* * * * * 4 votes

C.Basic - International Release

Casio Basic C.Basic

  • Please log in to reply
702 replies to this topic

#281 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 07 August 2019 - 04:16 AM

Hi sentaro21,
 
Thanks!
And another question: A=B Or A=C Or A=D Or B=C Or B=D Or C=D
This code is one part of my game project Guess Number for C.Basic version. :P
Is there a way to simplify this code?

Regards,
CalcLoverHK

#282 piu58

piu58

    Casio Freak

  • Members
  • PipPipPipPip
  • 147 posts
  • Gender:Male

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

Posted 07 August 2019 - 05:06 AM

I just updated my CG20 and tried my dipole program there. How much better it looks! I am real excited. You can see the area around the two charges / poles, where no streamlines exist.
~

I want to explain my astronomical friends the differences ans similarities of the different types of different field types (fields in closer physical sense). We have the gravity field, the electrostatic field and the magnetic field. The first and the last one play an important role for astrophysics. The electrostatic is of lesser interest.

The next step I make ist to show the streamlines for a gravity field. Becaus it is boring for a single mass I selected the system earth - moon. If the program works I show it here.



#283 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 August 2019 - 06:02 AM

@CalcLoverHK
In this case, 
You can access by index in List. ^_^
List 1[ 1]=List 1[ 2] Or List 1[ 1]=List 1[ 3] Or List 1[ 1]=List 1[ 4] Or List 1[ 2]=List 1[ 3] Or List 1[ 2]=List 1[ 4] Or List 1[ 3]=List 1[ 4]
When this is made into a program, it becomes as follows.
0->M
For 1->K To 3
  For 1->J To 4
   K<J=>List 1[K]=List 1[J]=>1->M
  Next
Next
If M Then "true"
If there are about 4 variables, it will not be short. :P
 
 
@piu58
Thanks!!
In CG20, I think your graphics program will be more attractive. :D


#284 tsiozos

tsiozos

    Casio Fan

  • Members
  • PipPip
  • 42 posts

  • Calculators:
    fx-9860gII

Posted 07 August 2019 - 07:44 AM

2.21 beta for 9860G/9860GII series.
        -Fixed "Range Error" when assigned directly to ViewWindow variable.
        -hange specification that Graph 35+E II hidden memory usable size has been changed from 128KB to about 188KB.
        -Fixed a bug that the SDK emulator could not be started after initialization.
 

 Yes! Thanks for the update. It works perfectly now!

 

Cheers!



#285 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 07 August 2019 - 08:45 AM

Hi sentaro21,

 

 

@CalcLoverHK
In this case, 
You can access by index in List. ^_^
List 1[ 1]=List 1[ 2] Or List 1[ 1]=List 1[ 3] Or List 1[ 1]=List 1[ 4] Or List 1[ 2]=List 1[ 3] Or List 1[ 2]=List 1[ 4] Or List 1[ 3]=List 1[ 4]
When this is made into a program, it becomes as follows.
0->M
For 1->K To 3
  For 1->J To 4
   K<J=>List 1[K]=List 1[J]=>1->M
  Next
Next
If M Then "true"
If there are about 4 variables, it will not be short. :P

Whoa! I can customize as many integers I can guess as I can in that way! Thanks a lot for giving me the idea of this.

But most importantly, can Casio Basic run this code?

 

Regards,

CalcLoverHK



#286 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 August 2019 - 09:18 AM

@tsiozos
Thanks for checking.
I'm happy that it works well. :D
 
 
@CalcLoverHK
Without using the extended functions of C.Basic,
If you use List 1[ 1]~List 1[ 4] instead of A~D variables, it will work with Casio Basic. ^_^
 


#287 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 07 August 2019 - 02:03 PM

Hi sentaro21,

 

I found a tutorial (by huhn_m) about the list variables and I saw this command:

 

Fill(X,List #) : fills a list with X.

 

Is the following code work the same way like above?

 

Fill(RanInt#(0,9),List 1)

 

Regards,

CalcLoverHK



#288 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 August 2019 - 12:30 AM

Is the following code work the same way like above?

 

Fill(RanInt#(0,9),List 1)

It becomes the same value. :)
 
If you want to set a different value in List 1,
RanInt#(0,9,4)->List 1
or
Seq(RanInt#(0,9),X,1,4,1)->List 1


#289 piu58

piu58

    Casio Freak

  • Members
  • PipPipPipPip
  • 147 posts
  • Gender:Male

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

Posted 08 August 2019 - 07:15 AM

As mentioned I have finished a first version of my program for calculation of the gravity field. The example implemented is the field earth-moon. For the coordinates I supposed 1 unit = 100'000 km, the masses are in relation to the mass of the earth. The program is able to incorporate more bodies, simply add them to Mat k.

 

The program calculates the streamlines of the gravity field. You get these lines if you follow the path of small particles with negligible mass. For calculating these paths I used the simpler Euler-Cauchy method. To get it more accurate one could use Runge-Kutta but the program gets much less clear then.

 

From a view far out both bodies (earth and moon) look like a single point. I selected this points at a distance of 10 from the center. 

 10sin (pi*f/180)->x
 10cos (pi*f/180)->y 

The field is already slightly bent there. You may set it more far out, but the program runs longer then.

 

The moon has only 1.8% of the earth's mass:

0.012->Mat k[1,2]

The image looks much more interesting if you give it 12% of the mass.

 

I run the program at my fx9860G. If you use it at the CG series with the better graphics, you may increase the number of streamlines. I use on eline every 10 degrees starting at a circle with the radius 10:

For 0->f To 360 Step 10

You can set the step to 5 or 2 degrees.

 

 

All in all it is a nice program to experiment with.

 

===

 

'ProgramMode:RUN
'Field earth and moon
Gosub G'InitGraph
2->n'number of bodies
{n,3}->Dim Mat k
'set values x y mass
(-)1.9->Mat k[0,0]
0->Mat k[0,1]
1->Mat k[0,2]
1.9->Mat k[1,0]
0->Mat k[1,1]
0.012->Mat k[1,2]
'all source points
For 0->f To 360 Step 10
 10sin (pi*f/180)->x
 10cos (pi*f/180)->y 
 Do'until xy reaches one off the source points
  Gosub A'acceleration
  x-0.1X/A->x
  y-0.1Y/A->y
  Plot x,y
  99->d
  For 0->I To n-1
   Gosub D
   D<d=>D->d
  Next
 LpWhile d>0.1
Next
Gosub S
'===========
Lbl A'accelerations
0->X
0->Y
For 0->I To n-1
 Gosub D
 X+(x-Mat k[I,0])Mat k[I,2]/DDD->X
 Y+(y-Mat k[I,1])Mat k[I,2]/DDD->Y
Next
Sqrt(XX+YY)->A
Return 


Lbl D'distance to point I
 Sqrt((x-Mat k[I,0])^<2>+(y-Mat k[I,1])^<2>)->D
Return 


'Envir.f.Graphic
Lbl G'Init
ClrGraph:CoordOff:AxesOff:GridOff:LabelOff:S-L-Normal:Rad:'#_SketchThin _
'_AxesOn_
ViewWindow (-)10,10,1,-5,5,1
Return 
'Print.XY
Lbl P
Text 1,9,"                                                                                    ":
Text 1,9,x:
Text 1,72,y'9860-72,CG-180
Return 
Lbl S'stop
Plot :Text 1,1,">"Disps

 

All in all it is a nice program to experiment with.

 


Edited by piu58, 08 August 2019 - 07:25 AM.


#290 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 August 2019 - 12:52 PM

@piu58
I enjoyed changing the parameters. ^_^
This is a very interesting curve.
In CG, the step to 3 degrees was good. 
Thanks very much! :D


#291 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 August 2019 - 01:37 PM

Hi sentaro21,

 

Have you ever tried to program in Scratch?

I think you can take some advantages of this programming language. It is similar with C.Basic.  ^_^

Timer (Stopwatch/countdown), username value and running multiple programs in sync are my wishes to see them happen in the future. (Maybe they are too harsh for you.)

I really look forward to seeing C.Basic evolved to such big size. Good job anyway!

 

Regards,

CalcLoverHK



#292 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 09 August 2019 - 02:54 AM

Hi sentaro21,

 

Have you ever tried to program in Scratch?

I think you can take some advantages of this programming language. It is similar with C.Basic.  ^_^

Timer (Stopwatch/countdown), username value and running multiple programs in sync are my wishes to see them happen in the future. (Maybe they are too harsh for you.)

I really look forward to seeing C.Basic evolved to such big size. Good job anyway!

 

Regards,

CalcLoverHK

 

Thanks! :D
I don't know much about Scratch, but I know they are installed in French scientific calculators.
 
In the FX version, the limit of add-in size is close, so there is not much room to add to C.Basic.
However, I would like to incorporate useful things as much as possible. ^_^


#293 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 09 August 2019 - 08:46 AM

Hi sentaro21,

 

 

 

In the FX version, the limit of add-in size is close, so there is not much room to add to C.Basic.
However, I would like to incorporate useful things as much as possible. ^_^

 

What is the maximum size limit of the add-ins?

 

By the way, can you please add two additions to C.Basic?

 

First one: One button, multiple commands

/Example/

Click the button "If.pack" (If-command package, you can rename it)

Then the screen will show:

If 
 Then 
 Else
IfEnd

For ElseIf, because it is an extension of C.Basic, keep it alone in the command menu.

Same condition with For~To~(Step~)Next, While~WhileEnd, Do~LpWhile, Switch~Case~Default... and so on.

It is because for example when you type If, you must have Then and IfEnd.

I think it can save up the time you spend on clicking buttons.

 

Second: Command shortcut button (can be customize)

Customize any buttons with a key combination that calculator/C.Basic doesn't have and it will input its corresponding command. Combine with the first one suggestion, it would be much faster to input command.

 

Regards,

CalcLoverHK  



#294 piu58

piu58

    Casio Freak

  • Members
  • PipPipPipPip
  • 147 posts
  • Gender:Male

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

Posted 09 August 2019 - 08:52 AM

I don't believe that such packages are a fine idea. We have a calculator here, not a real computer. The usage should be adequate for a PPC and not too complicated. The flipping through the program pages is complicated enough. A more complicated structure would increase such problems.

 

If you want to have this you may type the commands immediately in series - they are in the same menu. And the fill the gaps. 



#295 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 09 August 2019 - 08:58 AM

Hi piu58,

 

I don't believe that such packages are a fine idea. We have a calculator here, not a real computer. The usage should be adequate for a PPC and not too complicated. The flipping through the program pages is complicated enough. A more complicated structure would increase such problems.

 

If you want to have this you may type the commands immediately in series - they are in the same menu. And the fill the gaps. 

OK, but what about the shortcuts?

 

Regards,

CalcLoverHK



#296 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 09 August 2019 - 10:35 AM

@CalcLoverHK
The maximum add-in size is up to 512KB.
In CG,it is up to 2048KB.
 
About command shortcuts
Is it possible to use the command history of the MENU key? :)


#297 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 09 August 2019 - 02:24 PM

Hi sentaro21,

 

 

About command shortcuts
Is it possible to use the command history of the MENU key? :)

 

Umm, that's still need to find the command to input.

I mean you can set the key combinations like [OPTN+1] and set its corresponding command.

But its effect is not obvious without the command package.

 

Regards,

CalcLoverHK



#298 piu58

piu58

    Casio Freak

  • Members
  • PipPipPipPip
  • 147 posts
  • Gender:Male

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

Posted 09 August 2019 - 02:25 PM

OK, but what about the shortcuts?

 

Dear CasioLover,

 

it is easy to have ideas what can be added to such a program. But whether it is real useful and deserves the effort behind it, we only can find out by using C.Basic.

 

Using it means (in my eyes) to get into this language deeply, without looking at Casio Basic. As I started using it I was fascinated of

- The usage of small letter variable names. There are far less situations now ehre I have to use some kind of arbitrary variable name for a physical parameter (it ARE physical parameters in my programs)

- The option to use indenting and get readable programs

- The usage of well readable small fonts. This is especially true for the CG series

If I recommended changing something, I always look for thing which can be done easily but have a large effect. The indend mechanism is by way the most complicated one.

 

I know you are programming this master mind program. But you want to have it compatible with some models of calculators. So you cannot use the potential of C.Baisc to a large extend. I recommend to finish some real C.Basic programs and look then what serves most (which less effort). This forum is a good way to discuss such ideas.

 

BTW:

If you want to have a real programming language at a PPC, I recommend the CG-50 which comes with Python. Beside this, the french numworks calculator comes with Python too.


  • CalcLoverHK likes this

#299 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 09 August 2019 - 02:53 PM

@piu58,

 

Thanks so much reading my ideas. Maybe my ideas are too dumb as I don't quite much investigate inside C.Basic. :P

 

 

 

I know you are programming this master mind program. But you want to have it compatible with some models of calculators. So you cannot use the potential of C.Baisc to a large extend.

 

Well, actually I know C.Basic can't run in fx-7400/9750.  ;)

 

BTW:

If you want to have a real programming language at a PPC, I recommend the CG-50 which comes with Python. Beside this, the french numworks calculator comes with Python too.

I heard the numworks calculator and tried the emulator. Thanks anyway.

Python is now the popular programming language, but I still love the simplification and easy-to-use advantages of Basic.

 

@sentaro21,

 

I have problem about C.Basic in fx-9860G OS 1.02/1.03 emulator (not 9860GII). It seems be installed in calculator as it shows the installation complete message and also presented in its memory manager. But main menu doesn't show the C.Basic icon.

Does C.Basic dropped support on OS 1.02/1.03?

 

Best Regards,

CalcLoverHK


Edited by CalcLoverHK, 09 August 2019 - 03:15 PM.


#300 piu58

piu58

    Casio Freak

  • Members
  • PipPipPipPip
  • 147 posts
  • Gender:Male

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

Posted 09 August 2019 - 03:53 PM

Dear CalcLover,

 

I write articles for our German Astronomical Association, which have astrophysical content. Mostly, I give a small programs for giving the readers the chance to experiment with the astrophysics. Two years ago I started with this articles and I had to select a programming language. I selected Python.

 

 still love the simplification and easy-to-use advantages of Basic.

 

In my younger days (I am 60 now) well all used Basic. I have to say, Python has similar virtues. It is very close to the algebra. Notably, you don't have to declare variables, you may simply use them. I intended that my readers only install the basic (not BASIC :) ) Python package. I looked for a graphics, and I found a turtle graphic ready to use. So I can make "illustrations" at least at the C:Basic level.

 

In around half of the cases I start with C.Basic, because I can take the PPC anywhere, which is very comfortable. In moe complicated cases I start with C++, which is a lot faster too.


Edited by piu58, 09 August 2019 - 03:54 PM.


#301 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 August 2019 - 03:46 AM

@CalcLoverHK
About a shot cut, there is no key left that to be assigned it. :bow:
 
About emurator probrem,
That emulator seems to be not support add-ins.
If possible, you should get a real calculator. :)
In that case, I recommend CG50 too.
Please try the CG emulator first.
Since it supports add-ins,it can be use C.Basic  ^_^
 
 
 
@piu58
Thanks very much! :D
 
Since CG50's Python does not support graphics now, it is expected for future updates. ^_^


#302 tsiozos

tsiozos

    Casio Fan

  • Members
  • PipPip
  • 42 posts

  • Calculators:
    fx-9860gII

Posted 10 August 2019 - 07:33 AM

I see that there is an editor for Alpha vars and Matrices but I can't find an editor for Lists. Should we enter them programmatically only? {2,3,2,5}->List 1?



#303 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 10 August 2019 - 08:20 AM

Hi sentaro21,

 

Is there any way to check if the calculator has installed subprograms using command?

 

Like:

'Main program "123"
ProgCheck "ABC"'returns 0 or 1
If Ans=0
 Then "You have not installed "ABC"!"
 Else "You have installed "ABC"."
 Prog "ABC"
IfEnd

Regards,

CalcLoverHK


Edited by CalcLoverHK, 10 August 2019 - 08:24 AM.


#304 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 August 2019 - 10:18 AM


@tsiozos
To input/edit the list, press OPTN in matrix mode to enter List mode. List is implemented as a one-dimensional matrix, so you can input/edit like a matrix. ^_^
 
 
@CalcLoverHK
It is possible with the IsExist( command. ^_^
If IsExist("ABC.g1m")=0
 Then "You have not installed \"ABC\"!"
 Else "You have installed \"ABC\"."
 Prog "ABC"
IfEnd
 

 

 



#305 piu58

piu58

    Casio Freak

  • Members
  • PipPipPipPip
  • 147 posts
  • Gender:Male

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

Posted 10 August 2019 - 10:48 AM

Should we enter them programmatically only? {2,3,2,5}->List 1?

 

I don't use lists anymore in c.basic. You can use onedimesional matrices which have the advantage to have a letters a name, which may indicate it's use. Lists only have numbers.


Edited by piu58, 10 August 2019 - 04:41 PM.


#306 tsiozos

tsiozos

    Casio Fan

  • Members
  • PipPip
  • 42 posts

  • Calculators:
    fx-9860gII

Posted 10 August 2019 - 03:54 PM

Oh, ok thanks sentaro21 and piu58.
I'll adjust my program then.

#307 tsiozos

tsiozos

    Casio Fan

  • Members
  • PipPip
  • 42 posts

  • Calculators:
    fx-9860gII

Posted 11 August 2019 - 04:43 PM

I see that in Casio Basic there are Send( and Send38k( commands to communicate with EA200 sampling devices. So they are useless to send files to a connected PC with USB.

Can I use Send commands in C.Basic to send from a C.Basic program a List or a Matrix to the PC through the USB cable? Is there any way to do this? If possible I don't want to use FA -124.



#308 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 August 2019 - 05:06 AM

The Send command of C.Basic is communication only with 3Pin cable between calculators.
 
In the monochrome series, only Graph 35+E II can be transferred via USB between PC and calculator without FA-124. :)
All CG series can be transferred via USB. 
However, C.Basic does not support USB communication. :bow:

Edited by sentaro21, 12 August 2019 - 05:24 AM.


#309 tsiozos

tsiozos

    Casio Fan

  • Members
  • PipPip
  • 42 posts

  • Calculators:
    fx-9860gII

Posted 12 August 2019 - 01:23 PM

Ah ok. The Graph 35+E II is the one with python, i see. Much newer than my 9860gII.
I saw somewhere someone tried to send data from the 3pin to a USB->RS232 (the old serial port) adapter in the pc? Or directly to an old dot matrix printer with serial port? I have one at the school basement somewhere. Or should i not bother?
It would be fun to PRINT from the calculator to such a printer (at least it would awe the classroom).

PS. I know about the codes needed to send to print to such a printer, I did a little program in DOS back in my college days

Edited by tsiozos, 12 August 2019 - 01:26 PM.


#310 tsiozos

tsiozos

    Casio Fan

  • Members
  • PipPip
  • 42 posts

  • Calculators:
    fx-9860gII

Posted 13 August 2019 - 08:17 AM

Nevermind i saw it needs a considerable effort to build such a cable. Pity though.

#311 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 August 2019 - 09:00 AM

3pin allows asynchronous and synchronous serial communication.
I think communication with RS-232C compliant equipment is possible.
On the software side, I think it works just by implementing the protocol. :)
However, I'm not good at serial communication, so I haven't tried it yet.


#312 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 13 August 2019 - 12:43 PM

Hi sentaro21,

Is there a way to disable the loading symbol in fx-9860G/GII? (a small black square in upper-right corner)

It is quite annoying while I am playing some program games. Not only it blocks some part of the last unit of the first line and it is very to see and understand the unit, but also when I'm programming, I had to reserve the last unit not to display anything.

I do love the fx-CG50's loading circle. It is on the top of the bar and not in the display.

Anyway does C.Basic have this feature? If yes then thanks so much!

Regards,
CalcLoverHK

Edited by CalcLoverHK, 13 August 2019 - 12:43 PM.


#313 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 August 2019 - 12:46 AM

In C.Basic,
it can be deleted by using the _DispVram command. :)
_DispVram
Shift-F4(SKCH)-F3(ML)-F3(_DispVram)


#314 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 14 August 2019 - 07:32 AM

Hi sentaro21,

 

What is the maximum nesting in C.Basic? I don't quite remember.

If it is still 10, then my program may break.

 

Regards,

CalcLoverHK



#315 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 August 2019 - 08:20 AM

About the nesting level of Prog command of C.Basic,
Up to 16 in the 9860G series
Up to 24 in 35+E II.
Up to 128 in the CG series
This is specification of the current version. ^_^
 
But following loop commands nesteng level is up to 7.
For~Next
While~WhileEnd
Do~LpWhile
Switch~SwitchEnd
In case of nesting more than 7, it is necessary to use in combination. :)


#316 tsiozos

tsiozos

    Casio Fan

  • Members
  • PipPip
  • 42 posts

  • Calculators:
    fx-9860gII

Posted 14 August 2019 - 02:52 PM

Bug report:
There's a bug in MOD() function when #CBINT is set.
#CBINT
MOD(-5,3) returns 5. It should return 1
MOD(-6,3) returns 0. Correct.
MOD(-7,3) returns 4. It should return 2
MOD(5,3) returns 2. Correct.
 
But when #CBDBL is set, MOD works correctly.

C.Basic version 2.21b

Edited by tsiozos, 14 August 2019 - 05:36 PM.


#317 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 August 2019 - 05:02 AM

@tsiozos
Thanks very much for bug report. :D
The integer mode was a blind spot.
That bug was not noticed until now.
So,I updated because it was easy to fix. ^_^
 
2.22 beta for 9860G/9860GII series.
 
1.22 beta for CG10/20/50/Graph90+E.
-Fixed MOD( bug in integer mode.
(False) MOD(-5,3)->5
(True ) MOD(-5,3)->1
 
-Fixed a bug that garbage was generated at the end of the program when the indent function was used on the main memory.


#318 tsiozos

tsiozos

    Casio Fan

  • Members
  • PipPip
  • 42 posts

  • Calculators:
    fx-9860gII

Posted 15 August 2019 - 05:21 AM

Very nice. Thank you very much. I'm updating.

#319 tsiozos

tsiozos

    Casio Fan

  • Members
  • PipPip
  • 42 posts

  • Calculators:
    fx-9860gII

Posted 15 August 2019 - 01:20 PM

Are imaginary variables supported?
I get a syntax error in
#CBDBL
2+4i->c

#320 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 August 2019 - 12:40 AM

@tsiozos
Please set the execution mode to complex mode by setup.
Or set '#CBCPLX top of program.
'#CBCPLX
2+4i->c
Complex numbers are only supported in complex mode. :)
 
 
Newly found bug in Int÷.
 
2.22 beta for 9860G/9860GII series.
 
1.22 beta for CG10/20/50/Graph90+E.
-Fixed Int÷ bug in double/complex mode.
(False) -5 Int÷ 3->2
(True ) -5 Int÷ 3->1

Edited by sentaro21, 16 August 2019 - 08:06 AM.




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