Post Reply 
What Am I Missing (HP-71B)
11-03-2014, 03:20 PM
Post: #6
RE: What Am I Missing (HP-71B)
(11-03-2014 02:03 PM)Sylvain Cote Wrote:  If I find a way to pass an array I will post it.

(11-03-2014 01:41 PM)cruff Wrote:  The manuals and some testing suggest that a DEF FN can not accept an array as a parameter because it says all parameters are passed by value. Later on, the documentation for subprograms mentions array parameters can be passed by reference, but would require an output parameter: CALL DOT(A,B,D)

cruff was faster than me and he is right.

The following program should do what you where searching for ...

10 OPTION BASE 0
20 DIM A(1), B(1)
30 A(0)=4 @ A(1)=4 @ B(0)=5 @ B(1)=4
40 R=0 @ CALL SBD(R,A,B) @ DISP R
200 SUB SBD(Z,X(),Y()) @ Z=X(0)*Y(0)+X(1)*Y(1) @ END SUB

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


Messages In This Thread
What Am I Missing (HP-71B) - Les Bell - 11-03-2014, 04:53 AM
RE: What Am I Missing (HP-71B) - Les Bell - 11-03-2014, 10:45 AM
RE: What Am I Missing (HP-71B) - cruff - 11-03-2014, 01:41 PM
RE: What Am I Missing (HP-71B) - Sylvain Cote - 11-03-2014 03:20 PM
RE: What Am I Missing (HP-71B) - Les Bell - 11-03-2014, 10:21 PM
RE: What Am I Missing (HP-71B) - Les Bell - 11-04-2014, 01:01 AM
RE: What Am I Missing (HP-71B) - Joe Horn - 11-05-2014, 05:25 AM
RE: What Am I Missing (HP-71B) - Les Bell - 11-05-2014, 07:24 AM



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