|
-
Apr 5th, 2000, 03:35 PM
#1
Thread Starter
Junior Member
Hi there, i have created a new sub, and have put its one parameter set to optional, then in the procedure i test to see if the sub was passed the parameter or not, but on testing it, the ismissing( ) always return false even if nothing is passed to the sub. the parameter type is integer and it no value is passed it seem to get automatically assigned the value 0. Any ideas on what is happening here?
Thanks for any help, Piers
The early bird gets the worm, but the second mouse gets the cheese.
-
Apr 5th, 2000, 03:48 PM
#2
Fanatic Member
IsMissing uses variants. This may be what your problem is as you are checking an integer.
-
Apr 5th, 2000, 04:07 PM
#3
transcendental analytic
There is no need for ismissing if youre using optional but you have to set the integer default value:
Code:
Sub blabla(Optional argument As Integer = -1)
If argument = -1 Then
'code
Else
'code
End If
End Sub
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|