#321
Posted 16 August 2019 - 04:42 AM
#322
Posted 16 August 2019 - 09:57 AM
Hi sentaro21,
I recently heard about C:Basic (compiler) but not fully understand.
Therefore, I have few questions:
- What features are added?
- Does it support all the calculators that C.Basic also support?
- What is the current progress? (How much % is done, 0-100%) If 0%, which year/time will you start this compiler part?
- In theory, how is the speed of C:Basic compared to C.Basic and Casio Basic?
Thanks for reading my questions. Keep up the good work!
Regards,
CalcLoverHK
#323
Posted 16 August 2019 - 10:59 AM
I'm programming an algorithm for big number calculations (addition, subtraction etc) and I store each digit in a nimble matrix cell. But when i store any digit larger than 8 it makes it negative (understandable since it uses the highest order bit as sign) and causes problems. I don't want to use a byte matrix since it will double the needed storage (we're talking large numbers here with 2000 digits and such).
Is it possible to have some kind of flag, say like Mat a.Q to signify that a is an unsigned nibble matrix?
Thanks
Edited by tsiozos, 16 August 2019 - 11:43 AM.
#324
Posted 17 August 2019 - 02:52 AM
Edited by sentaro21, 17 August 2019 - 02:54 AM.
#325
Posted 17 August 2019 - 07:32 AM
Thank you very much! I'm updating right now.
#326
Posted 17 August 2019 - 04:06 PM
'#CBDBL
For 1->i% to 6
Disp i%
Next
This code makes the first loop i% takes the value of 1 then quits.
OTOH, the same loop in integer mode works fine. Also if i remove the % it works fine. If I increase the i% variable outside the loop with 1+i%->i% also works just fine. So, my guess is that integer variables confuse For loops or something.
Latest version of C.Basic.
#327
Posted 18 August 2019 - 03:42 AM
- tsiozos likes this
#328
Posted 18 August 2019 - 07:10 AM
Thank you very much for the bug corrections. Makes my simulation much faster indeed!
One last little bug before you release the final 2.23:
sprintf function doesn't seem to work correctly when printing an integer variable with the %d sequence:
#CBDBL 1->i% Disp sprintf("%d", i%) -------> prints some weird number (probably some double bit equivalent) 1072693248 but #CBDBL 1->i% Disp sprintf("%f", i%) -----------> prints correctly the value but as a double 1.00000
#329
Posted 18 August 2019 - 07:52 AM
#CBDBL 1->i% Disp Sprintf("%d", %i%)
Edited by sentaro21, 18 August 2019 - 07:53 AM.
#330
Posted 18 August 2019 - 07:54 PM
Edited by tsiozos, 18 August 2019 - 08:07 PM.
#331
Posted 19 August 2019 - 01:20 AM
But that's what i do and it doesn't work correctly.
How is the output result?
#333
Posted 19 August 2019 - 06:08 AM
'#CBDBL 6->E For 1-> I% To E Disp I% Next
#CBDBL 1->i% Disp sprintf("%d", %i%)
Edited by sentaro21, 19 August 2019 - 06:23 AM.
#334
Posted 19 August 2019 - 08:24 AM
Updating right now.
#335
Posted 19 August 2019 - 07:40 PM
I've made an algorithm that multiplies very large numbers. I ran it with two 47-digit numbers.
Casio Basic: ~44 sec
C. Basic: 0.5 sec. Yes: half a sec!!
Amazing. We're in C++ territory here.
I'll upload the code to try it yourself.
#336
Posted 20 August 2019 - 05:22 AM
#338
Posted 21 August 2019 - 01:25 AM
#339
Posted 21 August 2019 - 05:32 AM
Edited by tsiozos, 21 August 2019 - 05:42 AM.
#340
Posted 21 August 2019 - 12:17 PM
#341
Posted 21 August 2019 - 02:44 PM
#342
Posted 22 August 2019 - 01:00 PM
Hi, tsiozos and sentaro21
In a mean while until sentaro21 will be able to get some good idea, I think modified LARGEMUL could be used as subroutine.
I've wrote some subroutine which requires arguments and return, eg "Input Box" which I posted here before. Based on this experience, maybe following approach help.
For example, Mat X and Mat Y are defined in main routine, then call LARGEMUL, Prog "LARGEMUL" to output the result using Mat X and Y (global variables). In this case there is no return.
What do you think?
Edited by Krtyski, 22 August 2019 - 01:10 PM.
#343
Posted 23 August 2019 - 12:15 PM
Hi Krtyski.
Yes it will work. And the result can be written to a Str global variable.
#344
Posted 26 August 2019 - 09:57 AM
Hi sentaro21,
Seems I found a bug about memory management: In Main Mem, you can't go to SMEM when there is no file in main memory.
This can be easily fixed by creating at least one program.
Cheers,
CalcLoverHK
#345
Posted 26 August 2019 - 11:32 AM
- CalcLoverHK likes this
#346
Posted 26 August 2019 - 01:12 PM
Edited by tsiozos, 26 August 2019 - 01:15 PM.
#347
Posted 29 August 2019 - 04:56 AM
I am recently testing my programs in C.Basic, but C.Basic has some problems on my CG50 emulator. Almost every time the program runs to a loop and exit by pressing , it stopped running and do not show the Break message. It also cannot be closed, so I have to use Task Manager to mandatory close it. I don't know why it happens, but it is annoying that I have to use Casio Basic editor (it has no problems at all). Can you investigate it?
Cheers,
CalcLoverHK
#348
Posted 29 August 2019 - 09:43 AM
- CalcLoverHK likes this
#349
Posted 29 August 2019 - 12:29 PM
#350
Posted 29 August 2019 - 12:52 PM
Hi sentaro21,
I forgot to tell you that if you do the memory management bug procedure vice versa (a.k.a. SMEM→Main Mem), this bug still happen. My bad.
You can reset all in calculator and produce it. Again, it can be fixed by creating at least one program.
And another problem in my CG50 emulator, when I try to open an unsupported file and pressing
, it stucks so long time.
Cheers,
CalcLoverHK
Edited by CalcLoverHK, 29 August 2019 - 01:10 PM.
#351
Posted 29 August 2019 - 01:47 PM
Thanks for more bug reports.
I'll fixed next update.
Please wait a little.
#352
Posted 29 August 2019 - 02:53 PM
Hi Krtyski,
Regarding the question you ask me in IRC channel:
Why do you use emulator, not real CG50?
- Because fx-9860G series, fx-CG series and even fx-5800P calculators are not available in Hong Kong. Well, you can still find them, but it is extremely rare. Most importantly, we, Hong Kong students, are not allowed by HKEAA to use such calculators in exams (No.1 reason is they have access to 26 letters and you know , but I can't think why HKEAA doesn't know that fx-9860GII and fx-CG50 have Exam Mode). We normally use fx-3650PII and/or fx-50FHII calculators. You can look at HKEAA-permitted calculators list at http://www.hkeaa.edu...cal/CAL2019.pdf. Plus the expensive price of them (I'm in Form 3!), I prefer the emulator to the real one at this time.
And thanks for mentioning the problem I have. It sometimes stucks in my emulators, but I don't know if the real one also has this problem?
Cheers,
CalcLoverHK
Edited by CalcLoverHK, 29 August 2019 - 02:55 PM.
#353
Posted 30 August 2019 - 03:39 AM
Edited by sentaro21, 30 August 2019 - 03:39 AM.
#354
Posted 30 August 2019 - 06:27 AM
I built the serial cable with the MAX232 chip and I'm buying a usb to serial adapter for my laptop for testing. If I use
OpenComport38k 7,0,x
what do I need to put in "x"?
The manual says 0: not interrupt, 1: interrupt but I don't quite understand that.
I just need to send bytes to the pc running Hyperterminal on Windows.
Edited by tsiozos, 30 August 2019 - 06:30 AM.
#355
Posted 30 August 2019 - 07:27 AM
#356
Posted 31 August 2019 - 12:37 PM
#357
Posted 31 August 2019 - 02:37 PM
sentaro21
many thanks for the updating all version of over clocking tools.
In my Japanese site, I revised updated info.
#358
Posted 31 August 2019 - 03:09 PM
Hi, CalcLoverHK
Thank you for the answer!
Surprisingly I didn't know those programmable calcs are not available in HK, one of important financial center in Asia.
It's long time ago when I was student and at that time, as well as HK in all exams did not allow us to use any type of calculators, even in graduate school entrance exam.
Casio's largest market is for students in North America and some part of Europe, they said it's "Gakuhan" (https://edu.casio.co...kuhan/index.php). So in mother country of Casio, programmable calculator market is quite small. Due to this business size in Japan, some models such like fx-9860G Slim, fx-CG400 and fx-CG500 have not been available. I bought them in Amazon USA, eBay, etc.
Anyway, problems in key-in on C.basic has not been occurred on real calculators as far as I know. Between emulator and real one, timing of key input is slightly different. So sentaro21 adjusted the timing for emulator. Now C.Basic detect emulator automatically and change the timing and then single C.Basic add-in file supports both now.
Hi Krtyski,
Regarding the question you ask me in IRC channel:
Why do you use emulator, not real CG50?
- Because fx-9860G series, fx-CG series and even fx-5800P calculators are not available in Hong Kong. Well, you can still find them, but it is extremely rare. Most importantly, we, Hong Kong students, are not allowed by HKEAA to use such calculators in exams (No.1 reason is they have access to 26 letters and you know , but I can't think why HKEAA doesn't know that fx-9860GII and fx-CG50 have Exam Mode). We normally use fx-3650PII and/or fx-50FHII calculators. You can look at HKEAA-permitted calculators list at http://www.hkeaa.edu...cal/CAL2019.pdf. Plus the expensive price of them (I'm in Form 3!), I prefer the emulator to the real one at this time.
And thanks for mentioning the problem I have. It sometimes stucks in my emulators, but I don't know if the real one also has this problem?
Cheers,
CalcLoverHK
Edited by Krtyski, 01 September 2019 - 11:52 PM.
#359
Posted 01 September 2019 - 09:37 AM
Hi Krtyski and sentaro21,
Thanks for great updates. But tomorrow (9/2) is the starting of school days, so I can't try it yet. I will try to keep active on UCF.
As I said we use fx-3650PII and/or fx-50FHII in exams, but they have very limited Casio Basic (?→:◢, RTL, Goto, Lbl, If statement, For statement, While statement, Break) and cannot be nested more than one. The differences between fx-3650PII and fx-50FHII are that fx-3650PII has calculus calculations, while fx-50FHII has more programming bytes (680 bytes), 23 formulas (you cannot show the procedures because this is H (Hong Kong) varient) and 40 scientific constants. We normally use fx-50FHII in normal calculations and formulas, but when you choose M2 (Mathematics Extension Module 2 - Algebra & Calculus) as an elective course, you have to use fx-3650PII.
Buying both two calculators is the best situration in case of storing more programs or being uncertained about choosing M2 or not. However, the price is a big problem. fx-50FHII costs 175 HKD and fx-3650PII costs 155 HKD (These prices are only for school massive order, not to mention market price). Adding together is $330. Well, $330 for only 1070 bytes, 8 programming slots and very limited Casio Basic is not a good idea because the performance-price ratio is too low. Moreover, we are in 2019, but both calculators are released in 2013. No further upgrades for six years. I think it is time for Casio to upgrade and migrate those old models because they are similar.
Hope Casio cares about Hong Kong market.
Cheers,
CalcLoverHK
#360
Posted 03 September 2019 - 06:49 AM
Hi sentaro21,
Is there a way to treat the undefined value?
Example:
Undefined(1÷0)=>"Undefined ERROR"
It will show "Undefined ERROR" instead of showing the error message.
The "Undefined(" command is for not showing the error message. It will return 1 or 0 depend on the expression.
Cheers,
CalcLoverHK
Edited by CalcLoverHK, 03 September 2019 - 06:53 AM.
Also tagged with one or more of these keywords: Casio Basic C.Basic
General →
Your Projects →
Inside Casio Basic is now to be preparedStarted by Krtyski , 02 Dec 2016 Casio Basic C.Basic |
|
|
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users