Data type returned by function

  • Thread starter Thread starter cinnie
  • Start date Start date
C

cinnie

What do I type in the Immediate Window the determine the data type returned
by a function? (Similar to using '? vartype(MyVariable)' ) I need to
know the proper syntax.

thank you
 
cinnie said:
What do I type in the Immediate Window the determine the data type
returned
by a function? (Similar to using '? vartype(MyVariable)' ) I need
to
know the proper syntax.


Have you tried

?VarType(FunctionExpression())

or

?TypeName(FunctionExpression())

But what sort of functionare you wondering about, that you can't find out
from the function definition or the Object Browser?
 
It's just that naot all Functions have an 'As' term revealing the data type.
Are these all variants if the data type is not specified?
 
cinnie said:
It's just that naot all Functions have an 'As' term revealing the data
type.
Are these all variants if the data type is not specified?


Yes. If a function's header doesn't specify the return type, then the
function returns a Variant. In many cases, the function will return a
specific subtype of Variant -- e.g., Variant(String) -- or else Null. To
know that, though, you'd have to look at the function code itself.
 
Back
Top