HP Forums
HP-49 array indirect addressing - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: HP-49 array indirect addressing (/thread-21991.html)



HP-49 array indirect addressing - Karl-Ludwig Butte - 09-14-2002

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 - Vieira, Luiz C. (Brazil) - 09-15-2002

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 - Karl-Ludwig Butte - 09-16-2002

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 - Vieira, Luiz C. (Brazil) - 09-16-2002

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.