Skip to content

Commit

Permalink
stack opcode example comments (#3546)
Browse files Browse the repository at this point in the history
* stack opcode example comments

* move index into example

---------

Co-authored-by: Jimmy <jinghui@wayne.edu>
  • Loading branch information
Hecate2 and Jim8y authored Oct 23, 2024
1 parent 6d7ea43 commit 85f52f5
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/Neo.VM/OpCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,10 @@ public enum OpCode : byte
/// <summary>
/// The item n back in the stack is copied to the top.
///
/// <example> a b c d 2 -> a b c d b
/// index => 3[2]1 0
/// </example>
///
/// <remarks>
/// Push: 1 item(s)
/// Pop: 0 item(s)
Expand All @@ -735,6 +739,8 @@ public enum OpCode : byte
/// <summary>
/// The item at the top of the stack is copied and inserted before the second-to-top item.
///
/// <example> a b c -> a c b c </example>
///
/// <remarks>
/// Push: 1 item(s)
/// Pop: 0 item(s)
Expand Down Expand Up @@ -769,6 +775,10 @@ public enum OpCode : byte
/// <summary>
/// The item n back in the stack is moved to the top.
///
/// <example>a b c d 2 -> a c d b
/// index => 3[2]1 0
/// </example>
///
/// <remarks>
/// Push: 0 item(s)
/// Pop: 1 item(s)
Expand All @@ -793,7 +803,6 @@ public enum OpCode : byte
///
/// <example> a b c d -> d c b a</example>
///
///
/// <remarks>
/// Push: 0 item(s)
/// Pop: 0 item(s)
Expand All @@ -804,7 +813,8 @@ public enum OpCode : byte
/// <summary>
/// Pop the number N on the stack, and reverse the order of the top N items on the stack.
///
///
/// <example> a b c d 3 -> a d c b </example>
///
/// <remarks>
/// Push: 0 item(s)
/// Pop: 1 item(s)
Expand Down

0 comments on commit 85f52f5

Please sign in to comment.