Quote Originally Posted by Vincent Oorsprong View Post
No it is not one of the hidden dangers in the language...

Since DataFlex 7 the language allows developers to create two or more functions with the same name. This was not possible till that version. We introduced a language guide book and AFAIK this describes the RULE that calling functions via expressions is reserved for built-in and global functions and class members should be called via GET.

Note that expression executes the right function but the return type causes the problem.
here is an excerpt of the current doc about calling class/object functions

A class's behavior is defined by the methods that it implements. In DataFlex, there are two types of methods: functions and procedures. A function is used whenever you require a return value whereas procedures are useful for implementations of events.
The Function command defines an implementation of a function in the object or class where it is defined. Within the scope of the function are the variables on the parameter list and any variables declared within the body of the function.
You may call a function with the various forms of the Get command (e.g; Delegate Get and Forward Get, Broadcast Get) <b>or by using it in an expression:</b>

i dont see anywhere where it either says

"you have to use GET to call class/object methods"


"if you dare to use the epxression evaluator to use clas/object methods be prepared for your parameters or return values to be incorrect"

or something similar