Post Reply 
Basic RPL question
02-28-2016, 02:26 PM
Post: #14
RE: Basic RPL question
(02-25-2016 03:05 PM)Graan Wrote:  Just started to do some programming on my HP48GX and got into trouble that is probably very basic:

I have 3 global variables (KP,KI and KD) I want to use in a program but first want to convert them to local variables (kp, ki and kd):

1) Bring the global variables to stack
2) store as local variables -> kp ki kd

This is what I tried (and some other unsuccessful attempts):

<<
KP KI KD
-> kp ki kd
<<
do something
>>
>>

If your global variables already exist, then why not simply just use the global variables to do your calculations? The only reason to create the local variables kp ki and kd would be so that you can temporarily update the variables without changing the value of the existing global variables. So if your program does not actually need to keep separate copies of the global variables for temporary modification, you can simply just use KP, KI, and KD in your program to recall their contents.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Basic RPL question - Graan - 02-25-2016, 03:05 PM
RE: Basic RPL question - rprosperi - 02-25-2016, 03:19 PM
RE: Basic RPL question - David Hayden - 02-25-2016, 03:36 PM
RE: Basic RPL question - wojtek - 02-25-2016, 04:25 PM
RE: Basic RPL question - Graan - 02-25-2016, 07:53 PM
RE: Basic RPL question - David Hayden - 02-25-2016, 08:32 PM
RE: Basic RPL question - wojtek - 02-25-2016, 08:48 PM
RE: Basic RPL question - Graan - 02-25-2016, 08:54 PM
RE: Basic RPL question - wojtek - 02-25-2016, 08:35 PM
RE: Basic RPL question - Graan - 02-28-2016, 09:56 AM
RE: Basic RPL question - wojtek - 02-28-2016, 10:14 AM
RE: Basic RPL question - Paul Dale - 02-28-2016, 10:13 AM
RE: Basic RPL question - Graan - 02-28-2016, 01:02 PM
RE: Basic RPL question - DavidM - 02-28-2016, 03:27 PM
RE: Basic RPL question - rprosperi - 02-28-2016, 06:13 PM
RE: Basic RPL question - Graan - 02-28-2016, 07:00 PM
RE: Basic RPL question - Han - 02-28-2016 02:26 PM
RE: Basic RPL question - Graan - 02-28-2016, 03:22 PM
RE: Basic RPL question - Graan - 02-28-2016, 05:05 PM
RE: Basic RPL question - DavidM - 02-28-2016, 06:23 PM
RE: Basic RPL question - Tugdual - 02-28-2016, 10:01 PM
RE: Basic RPL question - David Hayden - 02-28-2016, 11:28 PM
RE: Basic RPL question - DavidM - 02-29-2016, 12:30 AM
RE: Basic RPL question - wojtek - 02-29-2016, 12:39 AM
RE: Basic RPL question - Claudio L. - 02-29-2016, 03:48 AM
RE: Basic RPL question - Han - 02-29-2016, 04:19 AM
RE: Basic RPL question - DavidM - 02-29-2016, 05:22 AM



User(s) browsing this thread: 3 Guest(s)