Class Trace Static IndentNum = 0 As Long Static Function GetIndentString() As String Dim i As Long Dim ResultStr = "" For i = 0 To ELM( IndentNum ) ResultStr = ResultStr + Ex"\t" Next Return ResultStr End Function Public /* TODO: 実装 ' アサート表示 Static Sub Assert( condition As Boolean ) If condition == False then 'TODO: コールスタックを表示 End If End Sub Static Sub Assert( condition As Boolean, message As String ) If condition == False then WriteLine( message ) End If End Sub */ ' インデントレベルを上げる Static Sub Indent() IndentNum++ End Sub ' インデントレベルを下げる Static Sub Unindent() If IndentNum <= 0 Then IndentNum = 0 Return End If IndentNum-- End Sub ' 一行の文字列を出力 Static Sub WriteLine( message As String ) Dim tempmsg = GetIndentString() + message + Ex"\n" OutputDebugString( tempmsg ) End Sub End Class