.NET および JVM COBOL と他のマネージ言語の型の互換性

多くのマネージ COBOL (.NET COBOL および JVM COBOL) の型は、binary-long や float-short などの他の言語のマネージ型と完全に一致しています。対応していない型については、代替型があります。

次の表に、.NET および JVM COBOL の型と他のマネージ言語のクラスや型との対応を示します。

マネージ COBOL (.NET または JVM COBOL) .NET の型 JVM の型 C# のキーワード 説明
整数型:
binary-char System.SByte byte sbyte 8 ビット符号付き整数

非 CLS 準拠

binary-char unsigned System.Byte   byte 8 ビット符号なし整数
binary-short System.Int16 short short 16 ビット符号付き整数

非 CLS 準拠

binary-short unsigned System.UInt16   ushort 16 ビット符号なし整数
binary-long System.Int32 int int 32 ビット符号付き整数
binary-long unsigned System.UInt32   uint 32 ビット符号なし整数

非 CLS 準拠

binary-double System.Int64 long long 64 ビット符号付き整数
binary-double unsigned System.UInt64   ulong 64 ビット符号なし整数

非 CLS 準拠

浮動小数点型:
float-short System.Single float float 単精度 (32 ビット) 浮動小数点数
float-long System.Double double double 倍精度 (64 ビット) 浮動小数点数
論理型:
condition-value System.Boolean boolean bool ブール値 (true または false)
その他の型:
character System.Char char char Unicode (16 ビット) 文字
decimal System.Decimal JVMDECIMAL」を参照してください。 decimal 96 ビット 10 進値
クラス オブジェクト:
object System.Object java.lang.Object object オブジェクト階層のルート
string System.String java.lang.String string Unicode 文字の不変固定長文字列
コレクション型:
list System.Collections.Generic.IList<T> java.util.List   順序が指定された項目のコレクション
dictionary System.Collections.Generic.IDictionary<TKey, TValue> java.util.Map   キーと値のマッピング
set System.Collections.Generic.ISet<T> java.util.Set<T>   順序が指定されていない項目のコレクション

例:

       local-storage section.
       01 aByte binary-char unsigned.
       01 aSignedByte binary-char.
       01 anInt16 binary-short.
       01 anInt32 binary-long.
       01 anInt64 binary-double.
       01 anUnsignedInt16 binary-short unsigned.
       01 anUnsignedInt32 binary-long unsigned.
       01 anUnsignedInt64 binary-double unsigned.
       01 aSingle float-short.
       01 aDouble float-long.
       01 aBoolean condition-value.
       01 aChar character.
       01 aDecimal decimal.
       01 anIntPtr type IntPtr.
       01 anUnsignedIntPtr type UIntPtr.
       01 anObject object.
       01 aString string.