[Gambas-user] Compiling a Gambas Project

Tobias Boege taboege at ...626...
Sun Dec 1 17:42:30 CET 2013


On Sun, 01 Dec 2013, Nigel Verity wrote:
> Hi
> 
> When I perform a "Compile" or "Compile All" operation from the Gambas menu any language syntax errors seem to be identified correctly. The same applies to declaration errors. However, I have noticed that calls to non-existant functions (as a result of spelling errors) are often not flagged. As a result the code passes the compilation checks and I can create an executable. The coding problems do, however, result in runtime errors.
> 
> Is there a setting to ensure that compilation identifies ALL problems, or is it just a shortcoming with the compile process?
> 
> Regards
> 
> Nige  		 	   		  

I suspect that you didn't use the proper terms in your explanation...

An attempted call to a non-existent *function* is reported at compile time -
for sure, always.

If you call a *method* of an object, the situation is different because
Gambas resolves method calls at runtime. This is needed to support all the
good OOP mechanisms such as virtual dispatching, method overriding and the
_unknown() special method! You see, it's actually a feature ;-)

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list