Difference between revisions of "/"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
m (Normalise with other arithmetic operator pages)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The '''/''' mathematical operator performs decimal point division on a numerical value.
The [[/]] mathematical operator performs decimal point division on a numerical value.




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




{{PageDescription}}
{{PageDescription}}
* Number value can be any literal or variable numerical type.
* Number value can be any literal or variable numerical type.
* Divisor can be any literal or variable numerical type. Cannot be a zero value or a [[ERROR Codes|"Division by zero" error]] will occur!
* Return values can be any literal or variable numerical type, but [[SINGLE]] or [[DOUBLE]] type decimal point returns are likely.
* Return values can be any literal or variable numerical type, but [[SINGLE]] or [[DOUBLE]] type decimal point returns are likely.
* Use the [[\]] integer division operator to guarantee [[INTEGER]] or [[LONG]] return values.
* Values returned may be expressed using exponential or [[scientific notation]] using '''E''' for SINGLE or '''D''' for DOUBLE precision.
* Division and multiplication operations are performed before addition and subtraction in Qbasic's order of operations.
* 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:''
 
[[MOD]], [[\]] (integer division operator)


[[Mathematical Operations]]


{{PageSeeAlso}}
* [[MOD|MOD (remainder division operator)]]
* [[\|\ (integer division operator)]]
* [[*|* (multiplication operator)]]
* [[INT]], [[CINT]], [[FIX]], [[_ROUND]]
* [[Mathematical Operations]]




{{PageNavigation}}
{{PageNavigation}}

Latest revision as of 16:26, 28 February 2021

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.
  • 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