nsis64 / Docs / src / stack.but

gol...@212acab6-… 205abbe 






































\S1{stackinst} Stack Support

\S2{Exch} Exch

\c [user_var | stack_index]

When no parameter is specified, exchanges the top two elements of the stack. When a parameter is specified and is a user variable, exchanges the top element of the stack with the parameter. When a parameter is specified and is a positive integer, \R{Exch}{Exch} will swap the item on the top of the stack with the item that is specified by the offset from the top of the stack in the parameter. If there are not enough items on the stack to accomplish the exchange, a fatal error will occur (to help you debug your code :).

\c Push 1
\c Push 2
\c Exch
\c Pop $0 # = 1

\c Push 1
\c Push 2
\c Push 3
\c Exch 2
\c Pop $0 # = 1

\c StrCpy $0 1
\c Push 2
\c Exch $0 # = 2
\c Pop $1 # = 1

\S2{Pop} Pop

\c user_var(out)

Pops a string off of the stack into user variable $x. If the stack is empty, the error flag will be set.

\c Push 1
\c Pop $0 # = 1

\S2{Push} Push

\c string

Pushes a string onto the stack. The string can then be Popped off of the stack.

\c Push "a string"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.