Home Segments Index Top Previous Next

102: Mainline

When trade_price is called, a copy of the value of the first argument becomes the value of the first parameter, p, and a copy of the value of the second argument becomes the value of the second parameter, n. Assuming, for example, that the value of the variable p is 10.2 and that the value of n is 600, the copying works like this:

trade_price (price, number) 
               |       | 
               |       |  Arguments are evaluated 
               v       v            | 
             10.2     600  <--------* 
               |       | 
               |       |  Values are copied into memory 
               |       |  reserved for parameters 
             p v     n v            | 
            *---*   *---*           | 
            |   |   |   | <---------* 
            *---*   *---*