A function is a body of code that returns a value.

The value returned may depend on arguments provided to the function.



Task

Write a definition of a function called "multiply" that takes two arguments and returns their product.

(Argument types should be chosen so as not to distract from showing how functions are created and values returned).



Related task

   Function prototype


 
Module Checkit {
      Module Multiply (a, b) {
            Push a*b
      }
      Multiply 10, 5
      Print Number=50
 
      Module Multiply {
            Push Number*Number
      }
 
      Multiply 10, 5
      Print Number=50
      \\ push before call
      Push 10, 5
      Multiply
      Read A
      Print A=50
      Push 10, 2,3 : Multiply : Multiply: Print Number=60
      Module Multiply {
            If not match("NN") Then Error "I nead two numbers"
            Read a, b
            Push a*b
      }
      Call Multiply 10, 5
      Print Number=50
      \\ now there are two values in stack 20 and 50
      Multiply
}
Call Checkit, 20, 50
Print Number=1000
 