call |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
File:Instructions-call.png
|
||||||||||||
Call a subroutine
|
Description
This instruction is effectively a subroutine. As you add parameters to the subroutine, it will expand with multiple inputs, 1 per parameter in your subroutine. These parameters work by reference, so if you change the parameter in the subroutine, it will return a value to the calling routine in that same parameter or variable you used in the call function. This allows you to pass parameters back and forth between the two programs.
Uses
Optimal usage tends to be breaking code down into more repeatable sections in cases where you would use the same string of instructions multiple times.
Similar Instructions
Notes
Any unused sub-behaviors that aren't called by a call instruction get trimmed out of the behavior.
Instructions | |
---|---|
Unit | |
Move | |
Component | |
Flow | |
Math | |
Global |