Data type returned by function

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
 
D

Dirk Goldgar

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?
 
C

cinnie

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?
 
D

Dirk Goldgar

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top