Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21856

How do you tell if an optional variable is used or not?

$
0
0
If my optional variable in a function is a numerical type and I don't pass anything into it, inside the function it behaves as if I passed a 0 to it. If my optional variable is a string and I don't pass anything into the function through that variable, inside the function it behaves as if I passed the empty string "" to it.

What I want though is to make a function who's optional variable can be checked in a way to see if in fact nothing had been passed to it, and if in fact nothing was passed to it, the function should behave differently than if a 0 or a "" was passed to it. How do I do this?

Viewing all articles
Browse latest Browse all 21856

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>