當前位置: 首頁>>代碼示例>>C#>>正文


C# Forth.PushInt64方法代碼示例

本文整理匯總了C#中SimpleForth.Forth.PushInt64方法的典型用法代碼示例。如果您正苦於以下問題:C# Forth.PushInt64方法的具體用法?C# Forth.PushInt64怎麽用?C# Forth.PushInt64使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SimpleForth.Forth的用法示例。


在下文中一共展示了Forth.PushInt64方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AuxDepth

 public static void AuxDepth(Forth f)
 {
     f.PushInt64((long)(f.aStack.Depth));
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:4,代碼來源:Forth.cs

示例2: OnePlus

 public static void OnePlus(Forth f)
 {
     long x = f.PopInt64();
     f.PushInt64(x + 1L);
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:5,代碼來源:Forth.cs

示例3: OneMinus

 public static void OneMinus(Forth f)
 {
     long x = f.PopInt64();
     f.PushInt64(x - 1L);
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:5,代碼來源:Forth.cs

示例4: Here

 public static void Here(Forth f)
 {
     f.PushInt64((long)(f.here));
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:4,代碼來源:Forth.cs

示例5: RefForward

 public void RefForward(Forth f)
 {
     f.PushInt64((long)Here);
     Add(null);
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:5,代碼來源:Forth.cs

示例6: Subtract

 public static void Subtract(Forth f)
 {
     long b = f.PopInt64();
     long a = f.PopInt64();
     f.PushInt64(unchecked(a - b));
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:6,代碼來源:Forth.cs

示例7: Divide

 public static void Divide(Forth f)
 {
     long b = f.PopInt64();
     long a = f.PopInt64();
     f.PushInt64(unchecked(a / b));
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:6,代碼來源:Forth.cs

示例8: Int32At

 public static void Int32At(Forth f)
 {
     long offset = f.PopInt64();
     uint l = unchecked((uint)f.byteMemory.ReadInt32(checked((int)offset)));
     f.PushInt64((long)l);
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:6,代碼來源:Forth.cs

示例9: Int64At

 public static void Int64At(Forth f)
 {
     long offset = f.PopInt64();
     long l = f.byteMemory.ReadInt64(checked((int)offset));
     f.PushInt64(l);
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:6,代碼來源:Forth.cs

示例10: ByteAt

 public static void ByteAt(Forth f)
 {
     long offset = f.PopInt64();
     byte b = f.byteMemory[checked((int)offset)];
     f.PushInt64((long)b);
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:6,代碼來源:Forth.cs

示例11: Int16At

 public static void Int16At(Forth f)
 {
     long offset = f.PopInt64();
     ushort u = unchecked((ushort)f.byteMemory.ReadInt16(checked((int)offset)));
     f.PushInt64((long)u);
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:6,代碼來源:Forth.cs

示例12: RealAddress

 public static void RealAddress(Forth f)
 {
     object obj = f.dStack.Pop();
     MemoryAccessor ma = (MemoryAccessor)obj;
     f.PushInt64(ma.RealAddress);
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:6,代碼來源:Forth.cs

示例13: ByteArraySize

 public static void ByteArraySize(Forth f)
 {
     byte[] bArr = f.PopByteArray();
     f.PushInt64((long)(bArr.Length));
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:5,代碼來源:Forth.cs

示例14: ByteArrayAt

 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]));
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:7,代碼來源:Forth.cs

示例15: Negate

 public static void Negate(Forth f)
 {
     long l = f.PopInt64();
     f.PushInt64(unchecked(-l));
 }
開發者ID:Sunlighter,項目名稱:SimpleForth,代碼行數:5,代碼來源:Forth.cs


注:本文中的SimpleForth.Forth.PushInt64方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。