Ignore:
Timestamp:
Dec 18, 2007, 2:55:40 AM (17 years ago)
Author:
dai
Message:

Foreachを試験的に実装。
ジェネリクスインターフェイスをサポートした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/system/enum.sbp

    r288 r396  
    2121    End Sub
    2222
     23    Function Operator() As Int64
     24        Return This.value
     25    End Function
    2326    Function Operator() As Long
    2427        Return This.value
     28    End Function
     29    Function Operator() As DWord
     30        Return This.value
     31    End Function
     32    Function Operator() As Boolean
     33        Return ( This.value <> 0 )
    2534    End Function
    2635
     
    4049        End If
    4150    End Function
    42 /*
    43     Function Operator or (enumBase As EnumBase) As EnumBase
    44         Return New EnumBase(This.value Or enumBase.value)
     51
     52    Function Operator or (enumBase As EnumBase) As Boolean
     53        Return ( This.value or enumBase.value ) <> 0
    4554    End Function
    4655
    47     Function Operator and (enumBase As EnumBase) As EnumBase
    48         Return New EnumBase(This.value And enumBase.value)
     56    Function Operator and (enumBase As EnumBase) As Boolean
     57        Return ( This.value and enumBase.value ) <> 0
    4958    End Function
    50 
     59/*
    5160    Function Operator xor (enumBase As EnumBase) As EnumBase
    5261        Return New EnumBase(This.value Xor enumBase.value)
Note: See TracChangeset for help on using the changeset viewer.