[Gambas-user] ambiguous help

Benoît Minisini gambas at ...1...
Wed Aug 19 16:06:24 CEST 2009


> Jean-Yves F. Barbier ha scritto:
> > Hi list,
> >
> > I made a test as: A=B=C=5, the non-clear error msg is:
> > "Ambiguous expression. Please use braces"
> > does it mean: {curly braces}, (round brackets / parenthesis) or [square
> > brackets]? (as many people improperly use the 2nd one with this name)
> >
> > JY
>
> As this is basic (well, "Almost Basic"), normal parenthesis (-) should
> be used...
> Are you trying to test for "B equals C" and assign the result to A? Or
> whatever? The gambas parser is not the most intelligent I've seen, but
> the expression is truely ambiguous, so the reply of the parser is
> 'correctly' ambiguous too... :-)
>
> Regards,
> Doriano
>

The '=' operator is binary and not associative, so your expression is 
ambiguous.

What you want to achieve is that:

(A = B) And (B = C) And (C = 5)

Regards,

-- 
Benoît




More information about the User mailing list