There are at least two flags on HP-12C: BEG/END and D.MY/M.DY.
What the fastest ways to get these flags values? (and shortest also).
Capture the flag - HP-12C programming contest
|
|
« Next Oldest | Next Newest »
|
▼
Post: #12
02-11-2011, 12:01 PM
There are at least two flags on HP-12C: BEG/END and D.MY/M.DY.
▼
Post: #13
02-11-2011, 12:59 PM
1) 10 second idea. Destroys values in financial registers. 0 FV 1 N 1 i 1 PV PMT 1 + X=0? If condition true then it was in BEG mode, otherwise END mode.
1.022 ENTER 1 CHS DATE INT 1 - x=0 will be true if mode was M.DY and will not if D.MY
▼
Post: #14
02-11-2011, 03:06 PM
1) Being not acquainted with finance, is N "n" or "Nj"? ▼
Post: #15
02-11-2011, 03:09 PM
Oops. N should be lowercase n. and an edit to the second set of instructions. Saves a step:
Edited: 11 Feb 2011, 3:11 p.m. ▼
Post: #16
02-11-2011, 03:17 PM
1) 11 steps.
▼
▼
Post: #18
02-11-2011, 03:34 PM
Gene, my HP12C says new program is actually a bit FASTER too :)
Post: #19
02-11-2011, 09:45 PM
Quote: Have I misunderstood something here? This returns 2.012 in M.DY mode and 32.012 in D.MY mode. That is, false for both modes. 1.012 ENTER 1 DATE INTG 1 - x=0 will return 0 and 1, respectively. Same number of steps though.
|