Jcat
宠辱不惊,闲看庭前花开花落~~
posts - 173,comments - 67,trackbacks - 0
     ' '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 阅读(199) 评论(0)  编辑  收藏 所属分类: VBA

只有注册用户登录后才能发表评论。


网站导航: