Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Return and ReturnIf

Peter Tillema edited this page Nov 26, 2018 · 2 revisions

ICE programs normally exit when execution reaches the bottom (end) of the program code, but if you need to end a program from somewhere else, you can use the Return token, available in the [Prgm] CTL menu from a program editor. When program execution reaches a Return token, the program ends as normal. There is also a ReturnIf token, Just place an If token directly after a Return token, with all your conditions after both tokens. This token is basically an If statement combined with a Return token. ReturnIf will evaluate the conditions you give it, and only return if the conditions return true (anything other than 0).

Return and ReturnIf also have one more use in ICE: to return from a Call token.

Clone this wiki locally