I overheard two developers talking in the next cubicle this morning.
Dev #1: So it's a logical value, right?
Dev #2: Yes, a boolean value.
Dev #1: Then it's true, false or unassigned.
Dev #2: Right.
The next sound was me slapping my forehead.
Best posts made by lizardfoot
-
Overheard in the next cube
-
Messing with the FNG
Had this little IM conversation with the new guy. He's young and impressionable. I'm an old fart.
FNG (01:25:32 PM): Hey is there a VBscript function that detects whether a number is negative
ME (01:26:12 PM): Uh, yeah. n < 0
FNG (01:27:47 PM): o... right >_>
ME (01:28:06 PM): I can wrap that in a fucntion for you...
FNG (01:28:42 PM): ok...
ME (01:30:43 PM): This will work:
Function isNegative(n)
isNegative = False
If n < 0 Then
isNegative = True
End If
End Function
FNG (01:32:27 PM): but what if it's null?
ME (01:32:49 PM): Oh yeah. Give me a minute...
ME (01:35:07 PM): try this:
Function isNegative(n)
If Not isNull(n) Then
If IsNumeric(n) Then
If n < 0 Then
isNegative = True
Else
isNegative = False
End If
Else
isNegative = NAN
End If
Else
isNegative = FILE_NOT_FOUND
End If
End Function
FNG (01:37:18 PM): Thanks!