Arminius / cat-language

Automatically exported from code.google.com/p/cat-language
Other
0 stars 0 forks source link

lteq: interpreter disagrees with description #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In cat online interpreter, type 1 3 <enter>. Note 3 is now on top of the
stack. 1 is second (if I'm understanding "top" and "second" correctly).
2. Now type lteq <enter>.
3.

What is the expected output?
false (pushed onto the stack in place of 3 and 1).
http://www.cat-language.com/primitives.html#lteq says "desc:
Pushes true if the top value is less than or equal to the second value,
false otherwise." 3 is not <= 1.
 What do you see instead?
true on top of the stack
Am I just nuts?

What version of the product are you using? On what operating system?
cat interpreter 1.3, Firefox 2.0.0.14

Please provide any additional information below.

Original issue reported on code.google.com by hutt...@gmail.com on 23 Apr 2008 at 6:02

GoogleCodeExporter commented 9 years ago
P.S. in the online interpreter, lteq has this tooltip description: "returns 
true if
the top value is less than, or equal to, the *first item* [emph. mine], or false
otherwise, e.g. 5 3 lteq == true"

To me, this is confusing... does it mean that the "first item" is not the top 
value?
Does "first" mean the *lowest* value on the stack to be consumed?
Or is this just a typo for "second value"?

Blessings,
Lars

Original comment by hutt...@gmail.com on 23 Apr 2008 at 6:34