Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tlug: I know that is out of TLUG but this is funny



--------------------------------------------------------
tlug note from "Yuri Anissimov" <youri@example.com>
--------------------------------------------------------
Hi all, something really puzzled me last night, eventually I've found the
solution but...
This is fine example of Visual Basic's Microsoft logic is not being
bivalent:
the only piece of code that is working:

if Null then ..
	else if Not Null then
		else ' Only here it is working ...

(calling routine has a variable of Null value, I am trying to pass it to
subroutine:)


Dim intNewCategory As Integer, intTruncateName As Integer, strTitle As
String, intMsgDialog As Integer
Dim stDocName As String

Dim qq As Variant
Dim stLinkCriteria As String
    stDocName = "Company"
    strTitle = "Empty Code field"
qq = Code.Value

If Not (qq = Null) Then
Else
intMsgDialog = vbYesNo + vbQuestion + vbDefaultButton1
            intNewCategory = MsgBox("Do you want?", intMsgDialog, strTitle)
            If intNewCategory = vbNo Then GoTo Exit_More_Click
            qq = True
End If


Null is tranzitive according to Microsoft manual, but God Forbid...
Yuri
-----------------------------------------------------------------
a word from the sponsor will appear below
-----------------------------------------------------------------
The TLUG mailing list is proudly sponsored by TWICS - Japan's First
Public-Access Internet System.  Now offering 20,000 yen/year flat
rate Internet access with no time charges.  Full line of corporate
Internet and intranet products are available.   info@example.com
Tel: 03-3351-5977   Fax: 03-3353-6096


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links