The Museum of HP Calculators

HP Forum Archive 09

[ Return to Index | Top of Index ]

HP-49 array indirect addressing
Message #1 Posted by Karl-Ludwig Butte on 14 Sept 2002, 9:52 a.m.

I have a problem with array indirect addressing: When I'm using direct addressing for the global array RTAB e.g. 'RTAB(1,2)' the contents of the cell in the first row/second column is pushed on the stack. But if I write 'RTAB(i,2)' with i=1 the whole term 'RTAB(i,2)' is pushed on the stack although Approximation Mode is active. What am I doing wrong, what do I need to do to get the value from the cell on the stack with indirect addressing and where can I get more detailed information about the different addressing modes ? Any hint is very much appreciated. Thank you very much in advance.

      
A solution for HP-49 array indirect addressing
Message #2 Posted by Vieira, Luiz C. (Brazil) on 15 Sept 2002, 9:27 a.m.,
in response to message #1 by Karl-Ludwig Butte

Hi;

In Aproximation Mode, (0,1) replaces 'i'. I tried what you mention and it worked fine with 'RTAB(I,2)' instead of 'RTAB(i,2)', being Aproximation Mode on OR off.

Let me know if you have success.

Cheers.

            
Re: A solution for HP-49 array indirect addressing
Message #3 Posted by Karl-Ludwig Butte on 16 Sept 2002, 2:18 a.m.,
in response to message #2 by Vieira, Luiz C. (Brazil)

Hello,

and thank you for your response. I experimented further and found out that the problem wasn't a capitol letter or not for the index variable. Instead I found that 'RTAB(I,2)' must be followed by the command -> Num and I made the mistake not to place << immedeately after the declaration of the index variable. Alas the full program isn't finished, yet. By the way, do you know if there is some documentation about the addressing modes somewhere in the Web ? If you're interested in further discoveries during this program development anyway, please let me know.

Kind regards

                  
Re: A solution for HP-49 array indirect addressing
Message #4 Posted by Vieira, Luiz C. (Brazil) on 16 Sept 2002, 10:02 a.m.,
in response to message #3 by Karl-Ludwig Butte

Hi, Karl;

another possibility is using EVAL instead of ->NUM (that's what I used). In order to indirectly address to any element in any data array, that's the one option I know.

As I remember well, HP48 original literature (manuals) mention this "indirect" access to array elements as 'Using Arrays and Array Elements in Algebraic Expressions' (User's Guide, 14-12). I also remember that the HP48S/SX literature ilustrated this sort of indirect access by using lists.

And yes, I am surely interested on this sort of subject. As you (and I) have discoveries/information about it, let's post them here.

Thank you. And best regards.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall