Difference between revisions of "/"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Clippy
m
Line 3: Line 3:




''Syntax:'' return_value = number '''/''' divisor
{{PageSyntax}}
::: return_value = number '''/''' divisor




Line 15: Line 16:
* Use the [[\|\ integer division]] operator to guarantee [[INTEGER]] or [[LONG]] return values.
* Use the [[\|\ integer division]] operator to guarantee [[INTEGER]] or [[LONG]] return values.
* Division and multiplication operations are performed before addition and subtraction in Qbasic's order of operations.
* Division and multiplication operations are performed before addition and subtraction in Qbasic's order of operations.




''See also:''
''See also:''
* [[MOD]], [[\|\ (integer division operator)]]
* [[MOD|MOD (remainder division operator)]]  
* [[\|\ (integer division operator)]]
* [[Mathematical Operations]]
* [[Mathematical Operations]]




{{PageNavigation}}
{{PageNavigation}}

Revision as of 12:42, 22 October 2012

The / mathematical operator performs decimal point division on a numerical value.


Syntax

return_value = number / divisor


Description

  • Number value can be any literal or variable numerical type.
  • Divisor (second value) must not be a value of 0 to .5. This will create a "Division by zero" error! due to CINT rounding.
  • Return values can be any literal or variable numerical type, but SINGLE or DOUBLE type decimal point returns are likely.
  • Values returned may be expressed using exponential or scientific notation using E for SINGLE or D for DOUBLE precision.
  • Use the \ integer division operator to guarantee INTEGER or LONG return values.
  • Division and multiplication operations are performed before addition and subtraction in Qbasic's order of operations.


See also:



Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page