50g multiple output
|
12-05-2021, 02:35 PM
(This post was last modified: 12-05-2021 03:20 PM by nlj.)
Post: #5
|
|||
|
|||
RE: 50g multiple output
(12-04-2021 08:13 AM)oierpa Wrote: If I try to calculate also total amount due (with formula M=R*A*12) nothing works. Two apparent errors that immediately jump out from the code above are these: 1) The -> command creates local variables whose scope is limited to the following algebraic or program object. So by the time you get to the 'R*A*12' algebraic your local variables are gone and the A here refers to a global variable A. 2) You haven't assigned a value to R in your program. Presumably you intend R to to refer to the value you put on the stack that you labelled "R" with the TAG command, but the calculator doesn't know what you intend. (And again in 'R*A*12', R refers to a global variable R.) You can fix Problem 1 by wrapping everything in a program object (with << and >>) from just before your first algebraic to the the end of the program. I hope this helps. N. [Edited with slightly better English.] |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
50g multiple output - oierpa - 12-03-2021, 03:43 PM
RE: 50g multiple output - DA74254 - 12-03-2021, 09:44 PM
RE: 50g multiple output - Joe Horn - 12-03-2021, 10:42 PM
RE: 50g multiple output - oierpa - 12-04-2021, 08:13 AM
RE: 50g multiple output - nlj - 12-05-2021 02:35 PM
RE: 50g multiple output - oierpa - 12-05-2021, 06:23 PM
RE: 50g multiple output - John Keith - 12-06-2021, 12:39 PM
RE: 50g multiple output - oierpa - 12-06-2021, 02:36 PM
RE: 50g multiple output - nlj - 12-06-2021, 05:59 PM
RE: 50g multiple output - oierpa - 12-10-2021, 06:53 PM
RE: 50g multiple output - nlj - 12-11-2021, 02:18 AM
RE: 50g multiple output - DavidM - 12-11-2021, 02:45 PM
RE: 50g multiple output - oierpa - 01-10-2022, 11:45 AM
RE: 50g multiple output - DavidM - 01-10-2022, 12:16 PM
|
User(s) browsing this thread: 1 Guest(s)