This repository was archived by the owner on Jan 26, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
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.
ICE Compiler | Peter Tillema
- Introduction
- Building your first program
- Math and numbers
- Variables
- Standard system commands
- Program flow control
- Pointers
- Graphics
- Sprites
- Tilemaps
- Useful routines