Should this work?

Just starting out? Need help? Post your questions and find answers here.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: Should this work?

Post by Kaeru Gaman »

ah, wonderful. thank you very much.
oh... and have a nice day.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: Should this work?

Post by Mistrel »

Is it necessary to have the Boolean keyword? Wouldn't just surrounding an assignment operation be enough to evaluate it as an expression?
Fred
Administrator
Administrator
Posts: 18161
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Should this work?

Post by Fred »

May be, but it will be much clearer like that.
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: Should this work?

Post by nco2k »

whoa.. thats some good news. thanks! :shock:

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
rudd68
User
User
Posts: 29
Joined: Wed Jun 09, 2010 2:55 pm

Re: Should this work?

Post by rudd68 »

Hello,
Mistrel wrote:Is it necessary to have the Boolean keyword? Wouldn't just surrounding an assignment operation be enough to evaluate it as an expression?
Fred wrote:May be, but it will be much clearer like that.
I think no. If you have far indented source code, a Keyword (e.g. Boolean) moves the expression to the right out of the visible part of the editor window. The source code is worse readable through this.

Logic / boolean expressions shouldn't have any keyword.

At ambiguous expressions I want a mainly logical interpretation opposite an assignment interpretation.

Example:

Code: Select all

a = b = c
;
; if b = c then a = #True else a = #False
Logic expressions should be allowed in mathematical expressions.

Example:

Code: Select all

a = 4 + 3 * (b = c)
;
; if b = c then a = 7 else a = 4
A short keyword (e.g. LET or ALL) should make a multi assingnment possible.

Example:

Code: Select all

LET a, b, c, d, e = x * 10
;
; a = x * 10 : b = x * 10 : c = x * 10 : d = x * 10 : e = x * 10

LET a, b, c, d, e = x = y
; 
; if x = y then a, b, c, d, e are #True else a, b, c, d, e are #False
Without "LET" keyword it would be clear also.

Greetings.
Post Reply