Hi,

I know it's been around for ages. It still irks. Sucking it up only helps for so long....

Wolfgang


Yes, its dumb, but the problem has been there since the day day dot. So
suck it up and work around :)

Per

On 19 September 2017 at 21:55, Wolfgang Lenerz via Ql-Users <
ql-users@lists.q-v-d.com> wrote:

On 19/09/2017 21:32, Dave Park via Ql-Users wrote:

Your BASIC interpreter fits in 48K. With room to spare.


And?

(pun intended)

Wolfgang

On Tue, Sep 19, 2017 at 2:27 PM, Wolfgang Lenerz via Ql-Users <
ql-users@lists.q-v-d.com> wrote:

Hi all,

Just a rant about the SBasic AND operator.

Suppose this:

10 a=0
20 b=10
30 if (a<>0 AND b/a=5)
40   do_something
50 end if

Run it and what happens?

You get an "overflow" error at line 30.
You get this error because it is trying to evaluate the second condition
(b/a) and failing as a=0 and you can't divide by 0.

BUT WHY IS IT TRYING TO EVALUATE THE SECOND CONDITION IN THE FIRST PLACE?

The first condition (a<>0) is NOT met and so, in any other programming
language I use, the second condition isn't even tested, as the result
will
be "false" anyway because of this.

Apparently though, Sbasic still also tests the second condition.

Grrrr.

Wolfgang






_______________________________________________
QL-Users Mailing List





_______________________________________________
QL-Users Mailing List



_______________________________________________
QL-Users Mailing List



_______________________________________________
QL-Users Mailing List

Reply via email to