|
From: KBH on 23 Jan 2008 00:04 Say that the calculator has numbered memories and does not have array or record memory structures. Okay Point 1 has two coordinates so the coordinates of Point 1 are put into which two memory locations ? See when there is a Point N the two memory locations for the coordinates of Point N must be known to the calculator program... So the KBH solution is that Point 1 uses memory locations of 2 and 3. Point 2 uses memory locations of 4 and 5. and of course Point N uses memory locations of (N*2) & (N*2)+1.
From: KBH on 23 Jan 2008 00:13 > Say that the calculator has numbered memories and does not have array or > record memory structures. > > Okay Point 1 has two coordinates so the coordinates of Point 1 are put > into which two memory locations ? > > See when there is a Point N the two memory locations for the coordinates > of Point N must be known to the calculator program... > > So the KBH solution is that > > Point 1 uses memory locations of 2 and 3. > Point 2 uses memory locations of 4 and 5. > > and of course > > Point N uses memory locations of (N*2) & (N*2)+1. Or Point 1 uses memory locations of 1 and 2 Point 2 uses memory locations of 3 and 4 and Point N uses memory locations of (N + (N - 1)) and ((N + (N - 1)) + 1) . which is also Point N uses memory locations of 2N -1 and 2N.
From: Raymond Del Tondo on 23 Jan 2008 02:56 ....and what's the point about this posting ? "KBH" <KBH(a)notmail.com> schrieb im Newsbeitrag news:%bAlj.71555$rc2.27785(a)bignews1.bellsouth.net... >> Say that the calculator has numbered memories and does not have array or >> record memory structures. >> >> Okay Point 1 has two coordinates so the coordinates of Point 1 are put >> into which two memory locations ? >> >> See when there is a Point N the two memory locations for the coordinates >> of Point N must be known to the calculator program... >> >> So the KBH solution is that >> >> Point 1 uses memory locations of 2 and 3. >> Point 2 uses memory locations of 4 and 5. >> >> and of course >> >> Point N uses memory locations of (N*2) & (N*2)+1. > > Or > > Point 1 uses memory locations of 1 and 2 > Point 2 uses memory locations of 3 and 4 > > and > > Point N uses memory locations of (N + (N - 1)) and ((N + (N - 1)) + 1) . > > which is also > > Point N uses memory locations of 2N -1 and 2N. >
From: mreed on 23 Jan 2008 08:56 > > Point 1 uses memory locations of 2 and 3. > > Point 2 uses memory locations of 4 and 5. > > > and of course > > > Point N uses memory locations of (N*2) & (N*2)+1. > > Or > > Point 1 uses memory locations of 1 and 2 > Point 2 uses memory locations of 3 and 4 > > and > > Point N uses memory locations of (N + (N - 1)) and ((N + (N - 1)) + 1) . > > which is also > > Point N uses memory locations of 2N -1 and 2N. I don't see a question to answer, so I suppose you are looking for agreement: does this work? Answer: yep, it does, and it's exactly how I store coordinates in my HP42s cogo program i wrote. I jump up past the first 15 registers however, so that i can use them to store intermediate results from the calculations, so actually I begin storing point 1 in registers 16 and 17, point 2 is in 18 and 19, etc. here are the first few lines of code from my program to show how i do it. 01. LBL $B!H(BCOGO$B!I(B 02. LBL 12 03. 2 04. x 05. 14 06. + 07. ENTER 08. ENTER 09. 1 10. + 11. RTN 12. LBL $B!H(BCOORD$B!I(B 13. $B!H(BPOINT NO.?$B!I(B 14. PROMPT 15. STO 13 16. LBL 13 17. XEQ 12 18. SF 10 19. XEQ $B!H(BNE$B!I(B 20. STO IND ST Z 21. R$B"-(B 22. STO IND ST Z 23. 1 24. STO+ 13 25. RCL 13 26. GTO 13 If you, or anyone reading this, would like full copies of my cogo programs, including instructions, program listings, etc. I'm making them available for free. it is a 12 page pdf file and i'll be happy to send it; just e-mail me at polarbear_mike(a)yahoo.com
From: KBH on 23 Jan 2008 13:52 >> > Point 1 uses memory locations of 2 and 3. >> > Point 2 uses memory locations of 4 and 5. >> > and of course >> > Point N uses memory locations of (N*2) & (N*2)+1. >> Or >> Point 1 uses memory locations of 1 and 2 >> Point 2 uses memory locations of 3 and 4 >> and >> Point N uses memory locations of (N + (N - 1)) and ((N + (N - 1)) + 1) . >> which is also >> Point N uses memory locations of 2N -1 and 2N. > > > I don't see a question to answer, so I suppose you are looking for > agreement: does this work? Answer: yep, it does, and it's exactly how > I store coordinates in my HP42s cogo program i wrote. I jump up past The subject was presentation...which is not disallowed in forums. The subject might be more interesting on a non-calculator forum...since some of us in some fields have worked with programmable calculators at a time when the business desk had a computer. Of course a computer with a programming language has array and record structures and thus an algorithm for memory locations is not necessary there...
|
Next
|
Last
Pages: 1 2 Prev: Recent history of HP calcs? Next: Static Status Line for HP48G in User RPL? |