[Gambas-user] Gambas scripting, Type mismatch error.
vuott at tiscali.it
vuott at tiscali.it
Tue Nov 17 20:23:51 CET 2020
I suggest:
http://gambaswiki.org/wiki/cat/evalorder
Il 17.11.2020 19:03 Bruce Steers ha scritto:
> Is this a bug in the scripter or bad coding technique on my part?...
> getting a type mismatch error if i do not wrap variables in
> parentheses?
>
> doesnt happen like this in normal gambas exe.
>
> If I use code like the following in a gbs script...
>
> Dim iVal As Integer = 1
>
> Print iVal This prints 1
>
> Print iVal + 1 this prints 2
>
> Print "Val = " & iVal this prints Val = 1
>
> Print "Val = " & iVal + 1
>
> This gives the following error..
>
> MMain.?.0: #6: Type mismatch: wanted Float, got String instead
>
> Print "Val = " & (iVal + 1) this works and prints i = 2
>
> Cheers
> BruceS
More information about the User
mailing list