コード例 #1
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void ByteArraySize(Forth f)
 {
     byte[] bArr = f.PopByteArray();
     f.PushInt64((long)(bArr.Length));
 }
コード例 #2
0
ファイル: Forth.cs プロジェクト: Sunlighter/SimpleForth
 public static void ByteArrayAt(Forth f)
 {
     byte[] bArr = f.PopByteArray();
     long index = f.PopInt64();
     if (index < 0 || index > ((long)(bArr.Length))) throw new IndexOutOfRangeException("Index " + index + " must be 0 to " + bArr.Length);
     f.PushInt64((long)(bArr[(int)index]));
 }