|
|
| What is the correct procedure to wire a single fork or multiple forks? |
| (1 ) |
100%
0%
|
Forks are a sign of choice in a program. Either the top line of the code is executed, or the bottom, depending on whether a certain condition is met (true) or is not met (false). After the split, the choices need to be merged back together to complete the fork with a 'fork merge'; do not use stop signs to end either side of a fork, as this will result in a program that does not work properly.
The following is incorrect:

Here is the same code with a fork merge added. This compiles and works properly. A jump/land loop is added in to make it a more useful program:

Remember: always use a fork merge with forks.
Wiring multiple forks can be confusing. Just remember that each fork needs its own fork merge. The error message isn’t always useful in detecting the source of the problem when this occurs.

This is the correct way to use fork merges:

AG ses kw
|