Jump to content

- - - - -

CG50 possible to use program inline?

programming basic cg50

  • Please log in to reply
3 replies to this topic

#1 TO-220



  • Members
  • Pip
  • 2 posts

  • Calculators:
    fx-cg50 fx-115es plus

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!

  • John Smith likes this

#2 John Smith

John Smith


  • Members
  • Pip
  • 1 posts

Posted 02 January 2020 - 03:30 AM

Is it possible to plot a function like RR(10, X)?

#3 TO-220



  • Members
  • Pip
  • 2 posts

  • Calculators:
    fx-cg50 fx-115es plus

Posted 17 January 2020 - 06:31 PM

Is that a hint? Seems like it might be but I'm having trouble connecting the dots...

#4 MJim


    Casio Fan

  • Members
  • PipPip
  • 47 posts
  • Gender:Male

  • Calculators:
    Casio ClassPad 300 Plus
    Casio fx-CG50
    Casio fx-9750GII SH4
    Casio fx-9750GA Plus
    Casio fx-7000G
    Casio fx-3650PII
    Casio fx-3650P
    Casio fx-3600PV
    Casio fx-50F
    Casio fx-991EX
    Casio fx-991MS 2nd Edition
    Casio fx-95MS
    Casio fx-82MS
    Casio fx-100D
    Casio fx-550S
    Casio fx-82AU Plus II
    Casio fx-82(original version),82SX,82LB
    Sharp El-W516X
    Sharp EL-506P (+1 clone)

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 ShiftMENUF2

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 ShiftVARS:


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 OPTNF6F6F3 to access the function menu, then press F1 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 ShiftVARS.

2) Pick the control menu and then pick Prog from this ( F2F1 ).

3) You need quotes to access a stored program, so use AlphaF2 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.

Also tagged with one or more of these keywords: programming, basic, cg50

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users