LB Booster
« Operator precedence: AND and OR »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:53am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Operator precedence: AND and OR  (Read 318 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Operator precedence: AND and OR
« Thread started on: Nov 26th, 2013, 08:34am »

Liberty BASIC handles expressions which contain both AND and OR operators in a non-standard way. This article at the LB Bug Tracker Wiki explains the issue:

http://libertybasicbugs.wikispaces.com/Logical+operator+precedence

To date, LBB has not attempted to emulate this behaviour but instead evaluates AND before OR, as in most other programming languages. I had hoped that it would be rare for this incompatibility to be important, but I have recently encountered a large program which fails for this reason.

I therefore propose to modify LBB so that it evaluates AND and OR with equal priority (left-to-right) as LB does. I realise that this may be controversial, but I find it difficult to justify emulating the non-standard behaviour of INT but not the non-standard behaviour of AND/OR.

Richard.
« Last Edit: Nov 26th, 2013, 08:37am by Richard Russell » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls