Is VARTYPE() a new command in VFP 6 ?
Michel.
=================== Original message follows =====================
>Hi Albert,
>
>>Not really, just the optional ability for the compiler to generate a jump table based on data types. Presumably this would be much faster than our current "if type("parameter") = '?'" method, and easier to code and maintain.
>
>I'm not sure this would be much faster. After all VARTYPE() is quite fast, probably as fast as possible since it's basically one line of C code (it returns the ev_type member of a value structure plus some additional checking for NULL plus an error handler for non existing variables).
>
>The most time consuming parts of a method call are
>
>- locating the actual method,
>- preparing the environment, like creating a new level of private variables, preparing a new DO level, etc.
>- evaluating all parameters and creating the parameter variables.
>
>Also, some of the Init code would be the same for different data types which requires an additional method call that also slows down the Init. And, during creation of an object, we also have the overhead of the actual creation. That means locating all parent classes, loading them, evaluating the fields in the VCX table, etc.
>
>Christof
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only