home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "Conditional Compilation Demo"
- ClientHeight = 3180
- ClientLeft = 1095
- ClientTop = 1515
- ClientWidth = 6345
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 3180
- ScaleWidth = 6345
- Begin VB.CommandButton Command1
- Caption = "Command1"
- Height = 615
- Left = 3600
- TabIndex = 0
- Top = 840
- Width = 1695
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- ' Compile time constant
- #Const UCASECTCONSTANT = True
- ' Runtime constant
- Dim UCASERTVARIABLE As Boolean
- Private Sub Command1_Click()
- Dim a$, b$
- UCASERTVARIABLE = True
- a$ = "This Was A Mixed Case String"
- b$ = "This Was Another Mixed Case String"
- #If UCASECTCONSTANT Then
- a$ = UCase$(a$)
- #Else
- a$ = LCase$(a$)
- #End If
- If UCASERTVARIABLE Then
- b$ = UCase$(b$)
- b$ = LCase$(b$)
- End If
- Print a$
- Print b$
- End Sub
-