Commodore‎ > ‎BASIC‎ > ‎Keywords‎ > ‎

* (multiply)

Keyword Abbreviation Token (hex) Version(s) Classification
* none AC 1.0 to 7.0 Operator (2)

  Syntax  
multiplicand multiplier
 
Parameters Type Legal Value(s) Default Value Note(s)
multiplicand Numeric
any
multiplier Numeric any
 
 
Returns Type Value(s) Note(s)
product Numeric
any
 
  Purpose  
Calculate an arithmetic expression.

 
  Remarks  
The multiply operator calculates the product of two real numbers.  I'm not going to explain how multiplication works; take a class in Elementry School if you need help. 
 
If the absolute value of the result is greater than 1.70141183e+38 then an OVERLOW ERROR occurs.  If the absolute value of the result is less than 2.93873588e-39 then it silently underflows to zero.  If either multiplicand or multiplier is not numeric, a TYPE MISMATCH ERROR occurs; if either is not a valid expression, SYNTAX ERROR occurs.
 
The multiply operator has the second-highest fixed priority (the same as divide, but lower than power).  The user of course may over-ride the built-in operator priorities by using parentheses "(" and ")".
 
Like all operators, the result may be printed, stored in an appropriate variable, or combined with other operators in a larger expression.  In this case, a numeric variable is required for storage.  But if the variable is an integer, the minimum result that can be stored is -32768 and the maximum is +32767; otherwise an ILLEGAL QUANTITY ERROR is generated.
 
  Compare With  
^, +
 
  Contrast With  
-, /, LOG, SQR
 
  See Also  
 

© H2Obsession, 2014
Comments