[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gambas-bugtracker] Bug #2839: Add flag or option to allow integer divide not generate ambiguous error


http://gambaswiki.org/bugtracker/edit?object=BUG.2839&from=L21haW4-

Comment #5 by Brian G has been edited:

Seems to be some error in the implementation

This :

' Gambas module file

Public Sub Main()

    Print "Hello world"

    Dim a As Integer = 5 \ 2 * 3 / 6
    Print a

End


gives this error:
Unable to find method Application_error in class Main. Symbol not found (main:7)

I have attached a small app as example

The actual error was

Type mismatch: wanted Integer, got Float instead Main.Main.13

should type conversion be automatic?

I added this to Main
Public Sub application_error(serror As String, sWhere As String)

    Print serror;; swhere

End

still getting 
Unable to find method Application_error in class Main. Symbol not found (main:7)

had to use a catch to get the error



----[ Gambas bugtracker-list is hosted by https://www.hostsharing.net ]----