Post Reply 
(HP48) Local variable limit
11-02-2017, 03:26 AM (This post was last modified: 11-02-2017 03:39 PM by Brad Barton.)
Post: #3
RE: (HP48) Local variable limit
Joe,

Thanks for taking a look. I was just trying something out and ran into this early in the process, so this is more of a code fragment than a program.

Code:
 \<< DUP
IF DET 0 ==
THEN "NO INV"
ELSE DUP DET SWAP
OBJ\-> DROP \-> dt a b c d e f g h i END
\<< 'dt' EVAL 'a' EVAL 'b' EVAL 'c' EVAL 'd' EVAL 'e' EVAL 'f' EVAL 'g' EVAL 'h' EVAL 'i' EVAL\>>
END
\>>

Obviously there was some mathy stuff in the middle of the program, but this is the debug version. If I put a 3 X 3 matrix on the stack and run this code, I get a "Too few arguments" error both in the calculator and emulator.

If I leave out the local variable 'i' the program runs, but 'h' evals as the 2nd to last element in the matrix. I'm not able to get it to recognize the last local variable. I tried changing it to 'j' and 'm' in case there was a conflict with the imaginary 'i', but it didn't seem to matter.

I'm using the following as a test matrix, but I don't think it matters as long as the determinant isn't zero.

[[ 1 2 3]
[0 8 5]
[7 5 9]]

I'm sure I've made a simple mistake, but I can't find it.

Brad
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(HP48) Local variable limit - Brad Barton - 10-30-2017, 03:37 AM
RE: (HP48) Local variable limit - Joe Horn - 10-30-2017, 03:58 AM
RE: (HP48) Local variable limit - Brad Barton - 11-02-2017 03:26 AM
RE: (HP48) Local variable limit - Joe Horn - 11-02-2017, 05:15 AM
RE: (HP48) Local variable limit - DavidM - 11-02-2017, 02:27 PM
RE: (HP48) Local variable limit - DavidM - 11-02-2017, 05:05 PM
RE: (HP48) Local variable limit - Gerald H - 11-02-2017, 05:04 PM
RE: (HP48) Local variable limit - Gerald H - 11-02-2017, 05:42 PM
RE: (HP48) Local variable limit - Gerald H - 11-02-2017, 07:00 PM
RE: (HP48) Local variable limit - Gerald H - 11-02-2017, 07:05 PM
RE: (HP48) Local variable limit - Joe Horn - 11-02-2017, 09:02 PM
RE: (HP48) Local variable limit - Gerald H - 11-03-2017, 06:43 AM



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