"Limit Minimum" complaint/question
Rayman
Posts: 14,825
So, I was looking for a SPIN MAX function...··You know x:=MAX(y,z) to set x to the bigger of y and z.
I came across the "Limit Minimum" operator that "compares two values and returns the highest value".
Why don't they just call it "MAX"?· For a language that otherwise seems to strive for simplicity, I don't understand this at all...
Or, am I missing something?
I came across the "Limit Minimum" operator that "compares two values and returns the highest value".
Why don't they just call it "MAX"?· For a language that otherwise seems to strive for simplicity, I don't understand this at all...
Or, am I missing something?
Comments
Evan
····A <# B
to mean "the value of A, forced to be less than or equal to B". Then it all makes sense!
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
A <=# B would make more sense to me ( although in Spin that would have to be A =<# B.
I instinctively read <# as 'less than number' which isn't correct.
The easiest solution if one really is having problems is to create a "PRI Max(a,b)" and "PRI Min(a,b)" methods and use those elsewhere.
At some point all technical manuals have a few typos creep in and some sections may be weaker because the author had a bad day. Often that is why the second edition of a text is the best. At some point, you just have to annotate according to what is clearest to you. AND report the typos to Parallax. They really do correct them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It's sunny and warm here. It is always sunny and warm here.... (unless a typhoon blows through).
Tropically, G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
I think it was probably done this way so that the old codgers who are used to seeing it this way didn't have to think about it.
I have to confess, I looked at it a couple of times and then just decided to ignored it...
...but compact code is not exactly my forte[noparse]:)[/noparse]
The same is true for other instructions in both Spin and Propeller Assembly... if you don't like them or can't remember them, don't worry about it... they are just there to save you a few lines of code ... so if you keep your needs simple... you don't need to clutter your mind with a bunch of speculated instructions....
On the other hand... if you just remember that they are there and roughly what they do... it is always possible to look them up when you need them.
One of the things that all of the controversy about instructions per second (in Spin) seems to miss is just how much you can get done with a single line of code... if you really need to. Dittos for Propeller Assembly.
Rich
ILMP