????
'
'Logical?Structures
????
Dim
?flag?
As
?
Integer
????
'
1)
????
If
?
True
?
Then
?flag?
=
?
1
?
Else
?flag?
=
?
0
????Debug.Assert?flag?
=
?
1
????
'
2)
????
If
?
False
?
Then
????????flag?
=
?
1
????
Else
????????flag?
=
?
0
????
End
?
If
????Debug.Assert?flag?
=
?
0
????
'
3)
????flag?
=
?
IIf
(
True
,?
1
,?
0
)
????Debug.Assert?flag?
=
?
1
????
????
'
'Logical?Operators
????Debug.Assert?(
1
?
=
?
1
)?
=
?
True
????Debug.Assert?
Not
?(
1
?
=
?
1
)?
=
?
False
????Debug.Assert?(
True
?
And
?
False
)?
=
?
False
????Debug.Assert?(
True
?
Or
?
False
)?
=
?
True
'
'Loop?Structure
For
?i?
=
?
1
?
To
?
5
????
????
If
?
?
Then
????????
Exit
?
For
?
'
相當于Break
????
End
?
If
Next
?i
posted on 2008-03-25 18:05
Jcat 閱讀(215)
評論(0) 編輯 收藏 所屬分類:
VBA