"Implemented new comparison functions, for comparing arbitrary arguments to X
or to zero: X=?, X<?, 0=?, etc."
Where to find, how to use?
Thanks
free42 3.01 new comparison functions
-
- Posts: 1102
- Joined: Tue May 02, 2017 5:48 pm
- Location: Netherlands
- Contact:
Re: free42 3.01 new comparison functions
They're in the PRGM sub-catalog: [Shift] [+] [▼] [LOG] [▼] for the comparisons with X, and another [▼] for the comparisons with 0.
In 3.0.3, they're in sub-sub-catalogs of their own: [Shift] [+] [▼] [LOG] [▲], then [LN] for the comparisons with 0 or [XEQ] for the comparisons with X.
Using them should be pretty straightforward. X>? "A" tests if the contents of the X register are greater than the contents of the variable named "A", 0=? IND 12 tests if the contents of the register or variable pointed to by the contents of the numbered register 12 are zero, etc.
UPDATE — On the DM42, instead of [LOG], [LN], and [XEQ], use the 4th, 5th, and 6th menu keys. (Is there a naming convention for those? Should I just say F4, F5, and F6?)
In 3.0.3, they're in sub-sub-catalogs of their own: [Shift] [+] [▼] [LOG] [▲], then [LN] for the comparisons with 0 or [XEQ] for the comparisons with X.
Using them should be pretty straightforward. X>? "A" tests if the contents of the X register are greater than the contents of the variable named "A", 0=? IND 12 tests if the contents of the register or variable pointed to by the contents of the numbered register 12 are zero, etc.
UPDATE — On the DM42, instead of [LOG], [LN], and [XEQ], use the 4th, 5th, and 6th menu keys. (Is there a naming convention for those? Should I just say F4, F5, and F6?)
Re: free42 3.01 new comparison functions
Thank you Thomas.
Got it.
Would be nice if SM would integrate that in the DM42 programming tool
Ratwolf
Got it.
Would be nice if SM would integrate that in the DM42 programming tool
Ratwolf
Re: free42 3.01 new comparison functions
But why when I manually edit a program on my DM42, see embedded code, because programming tool does not yet support the new comparison commands and replace
21 RCL "Count"
22 RCL "Loop"
23 X>Y?
24 GTO 01
by
21 RCL "Count"
22 x<? "Loop"
23 GTO 01
then the program runs one time. Second time results in insufficient memory and then in general the calculator shows insufficient memory even if I do not run this program but a solver function and I have to reset the calculator to resolve this??? Settings for stack are 4STK!!!
21 RCL "Count"
22 RCL "Loop"
23 X>Y?
24 GTO 01
by
21 RCL "Count"
22 x<? "Loop"
23 GTO 01
then the program runs one time. Second time results in insufficient memory and then in general the calculator shows insufficient memory even if I do not run this program but a solver function and I have to reset the calculator to resolve this??? Settings for stack are 4STK!!!
Code: Select all
00 { 113-Byte Prgm }
01▸LBL "PiMC"
02 0
03 SEED
04 STO "Circle"
05 STO "Square"
06 STO "Count"
07 INPUT "Loop"
08▸LBL 01
09 RAN
10 X^2
11 RAN
12 X^2
13 +
14 1
15 X≤Y?
16 GTO 02
17 STO+ "Circle"
18▸LBL 02
19 STO+ "Square"
20 STO+ "Count"
21 RCL "Count"
22 RCL "Loop"
23 X>Y?
24 GTO 01
25 RCL "Circle"
26 RCL÷ "Square"
27 4
28 ×
29 END
-
- Posts: 1102
- Joined: Tue May 02, 2017 5:48 pm
- Location: Netherlands
- Contact:
Re: free42 3.01 new comparison functions
Yes, the new comparison functions have a memory leak. This was fixed in Free42 3.0.3, but the DM42 firmware does not have that fix yet.
viewtopic.php?f=17&t=2963
viewtopic.php?f=17&t=2963
Re: free42 3.01 new comparison functions
O.k. too bad... because these new comparison functions are really helpful
So lets hope that SM will provide an update to free42 3.03 soon and update the programming tool too
So lets hope that SM will provide an update to free42 3.03 soon and update the programming tool too
Re: free42 3.01 new comparison functions
I just read the release notes of v3.0.3, a couple of nice surprises there, Thomas!
- INDEXing a local matrix, and returning to a previously indexed one when the function returns
- RTNERR that accepts a string, and ERRNO and ERRMSG - these were in my 'err handling improvements' list.
Thanks! Here's to hoping that the SM team finds the time to incorporate these into the DM42 soon.
Cheers, Werner
- INDEXing a local matrix, and returning to a previously indexed one when the function returns
- RTNERR that accepts a string, and ERRNO and ERRMSG - these were in my 'err handling improvements' list.
Thanks! Here's to hoping that the SM team finds the time to incorporate these into the DM42 soon.
Cheers, Werner
41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE, DM15L