[Gambas-user] Problem with finished Shell Process.State <> Process.Stopped
adamnt42 at gmail.com
Mon Feb 27 08:41:37 CET 2023
On 27/2/23 3:14 pm, T Lee Davidson wrote:
> On 2/26/23 23:40, Bruce Steers wrote:
>> Almost as much as misplacing the Not in a test
>> If Not sString Begins "Something" Then
>> Print "Damn it!! 'Not' is in the wrong place and has only tested
>> if the string exists and I will need bug hunt this! :-\"
Actually, I don't think it's that funny at all. The help says:
_Result_ *= NOT* _Expression_
Computes the logical not of an expression.
The logical NOT operator takes one boolean expression and returns its
*Why does Gambas interpret the _predicate_ to be the
*_*String*__**__*object*_*and not the expression?* /sString /is not a
boolean expression, /sString begins "Something" /is one.
The Not is acting as an operator rather than a logical condition , which
is fine when we want to operate on some thing outside a logical
condition, such as in xyzzy.Visible = not xyzzyVisible. But not so when
it is used in a logical condition. Other examples are:
If Not A or B ...
If Not A and C or Not B and C ...
If Not A or Not B and C ..
If I really want to use Not as an operator in a logical expression then
Gambas should force me to use "If Not(thing) and/or/=/Is/...
Of course, changing this at this stage of the language maturity would
possibly break uncountable code but would it?
Just my (ever devaluing) 2 cents worth.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User