Ignore:
Timestamp:
Nov 20, 2007, 12:04:07 AM (17 years ago)
Author:
イグトランス (egtra)
Message:

例外クラスの実装。ExceptionTestでSystem.Exceptionを使用するようにした。
StringBuilderでコメント化されていた例外を投げる処理を有効にした(除OutOfMemory)。
Str$の実装にSPrintfなどを使用するようにした。
毎回Object.ReferenceEquals(xxx, Nothing)と打つのが面倒なので、IsNothingを導入。

Location:
trunk/Include/Classes/ActiveBasic
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/ActiveBasic/Strings/SPrintF.ab

    r384 r385  
    9090    Zero = &h4
    9191    '! 左揃え、-。フィールド内で左揃えにする。
    92     Left = &h8
     92    LeftSide = &h8
    9393    /*! 代替表記、#。
    9494    <ul>
     
    867867        If .Length < field Then
    868868            Dim embeddedSize = field - .Length
    869             If flags And Left Then
     869            If flags And LeftSide Then
    870870                .Append(&h20, embeddedSize)
    871871            Else
     
    898898    Dim sb = New System.Text.StringBuilder(
    899899        x, 0, System.Math.Min(x.Length As DWord, d) As Long, field)
    900     AdjustFieldWidth(sb, field, flags And Left)
     900    AdjustFieldWidth(sb, field, flags And LeftSide)
    901901    FormatString = sb.ToString()
    902902End Function
     
    915915    Dim sb = New System.Text.StringBuilder(field + 1)
    916916    sb.Append(x)
    917     AdjustFieldWidth(sb, field, flags And Left)
     917    AdjustFieldWidth(sb, field, flags And LeftSide)
    918918    FormatCharacter = sb.ToString()
    919919End Function
     
    10941094                flags Or= Sign
    10951095            Case &h2d '-
    1096                 flags Or = Left
     1096                flags Or = LeftSide
    10971097            Case &h26 '&
    10981098                flags Or= BPrefix
     
    11221122    If ReadInt(fmt, params, paramsCount, t) Then
    11231123        If t < 0 Then
    1124             flags Or= Left
     1124            flags Or= LeftSide
    11251125            fieldWidth = -t As DWord
    11261126        Else
  • trunk/Include/Classes/ActiveBasic/Strings/Strings.ab

    r383 r385  
    9595    ChrCmp = ChrCmp(s1, s2, System.Math.Min(size1, size2))
    9696    If ChrCmp = 0 Then
    97         ChrCmp = ( size1 - size2 ) As Long
     97        ChrCmp = (( size1 - size2 ) As LONG_PTR) As Long
    9898    End If
    9999End Function
     
    102102    ChrCmp = ChrCmp(s1, s2, System.Math.Min(size1, size2))
    103103    If ChrCmp = 0 Then
    104         ChrCmp = ( size1 - size2 ) As Long
     104        ChrCmp = (( size1 - size2 ) As LONG_PTR) As Long
    105105    End If
    106106End Function
Note: See TracChangeset for help on using the changeset viewer.