With the cg50 is it possible to use a program inline? For example, say I have a parallel resistor program named RR with two input arguments. Is there a way I can use this program inline as a function like this;
5 + RR(10, 25)
Thank you!
Posted 02 November 2019 - 10:03 PM
With the cg50 is it possible to use a program inline? For example, say I have a parallel resistor program named RR with two input arguments. Is there a way I can use this program inline as a function like this;
5 + RR(10, 25)
Thank you!
Posted 02 January 2020 - 03:30 AM
Is it possible to plot a function like RR(10, X)?
Posted 17 January 2020 - 06:31 PM
Is that a hint? Seems like it might be but I'm having trouble connecting the dots...
Posted 19 January 2020 - 02:54 AM
As far as I can tell, and this is by no means the final word as I'm a beginner at Casio Basic programming, it doesn't look like you can.
You can create and run programs directly in Linear mode or even store them as functions, but to get that sort of ability to pass variables into functions like that I think that only the Python shell on the CG-50 would have this capability.
In any case, if you want to store a bit of Casio Basic as a function:
1) Switch to Linear mode
2) Here is a rough version of parallel ohms where you enter the resistor values that are in parallel and then enter '0' to return the overall resistance of the parallel circuit (note <> means notequal symbol equivalent). You can access the programming command menus by pressing
:
0->B:Lbl 1:?->A:While A<>0:B+A-1->B:Goto 1:WhileEnd:B-1
3) To store this sequence of commands as a function
to access the function menu, then press and pick a function memory to store this.
As an alternative you can call programs from within Linear mode using the Prog command. Let us say that you have a program that you have saved called OHMS, if you want to run this program, you want to type out:
Prog "OHMS"
To do this:
1) Choose the programming command menu again
.2) Pick the control menu and then pick Prog from this (
).3) You need quotes to access a stored program, so use
to pick ".4) Type in the name of the program and then end the name with another ".
Edited by MJim, 19 January 2020 - 03:02 AM.
Programming →
Casio Basic →
ASCII conversion table on fx G seriesStarted by Just_A_Noob_Here , 20 Jul 2024 ascii, casio, programming and 4 more... |
|
|
||
Programming →
General Help →
Programming Newton- Rhapson's method for numerical integrationStarted by Thesebjo , 12 Dec 2023 nDeriv / dy/dx, Programming and 6 more... |
|
|
||
Calculators →
Casio CFX/AFX/FX/Prizm →
Is anyone else having trouble updating their Casio fx-CG50?Started by polaris , 23 Aug 2023 cg50, graphical, update |
|
|
||
General →
Your Projects →
Casio BASIC editorStarted by Tritonio , 11 Sep 2022 basic, editor |
|
|
||
General →
Your Projects →
Essential FPS game scriptsStarted by FrankJ , 19 Jan 2021 Programming, Games, Code |
|
|
0 members, 1 guests, 0 anonymous users