Building off the previous program, switch the action to return the message as text. Instead of outputting the text right away, the action will return the text so that the values are output in the Main action. You should expect the same output.
14 is smaller than 21 22 is equal to 22 73 is larger than 54
Coding:
Hotkey Shortcuts
Move BlocksUP or DOWN or TAB
Run Program ALT + SHIFT + R
Stop Program ALT + SHIFT + S
Hide Tray ALT + SHIFT + X
Zoom In ALT + +
Zoom Out ALT + -
Open Help ALT + SHIFT + H
Navigate to Tray ALT + 1
Navigate to Blocks ALT + 2
Enter Navigation Mode SHIFT + ENTER
Blocks
Hint
Great job!
Try again
Remove the output from the front of each block and replace it with an assignment to the variable result. You can select the output block and select the left arrow to type return where output is. When the program is run, the text is saved in a variable. At the end of the CompareNumbers action, the call return result returns the text to Main where it is stored in a variable and output. In programming, there are often many ways to solve a problem. This one is a little more general-purpose than the previous solution. Using a return type often allows a programmer to reuse an action for more than one way.