This documentation is out of date.

The new version of the documentation is here: https://cannylogic.com/docs

Difference between revisions of "Subtraction"

From CANNY Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Created page with " <div style="float:right;margin:5px;"> {|class="cannytable" width="350px" |- !colspan="2" style="background-color:#AFEEEE;"|Appearance |- |colspan="2" align="center" style="...")
 
 
(4 intermediate revisions by 3 users not shown)
Line 6: Line 6:
 
!colspan="2" style="background-color:#AFEEEE;"|Appearance
 
!colspan="2" style="background-color:#AFEEEE;"|Appearance
 
|-
 
|-
|colspan="2" align="center" style="padding:10px;"|[[Изображение:5_5_2_2.png]]
+
|colspan="2" align="center" style="padding:10px;"|[[File:5_6_2_2.png]]
 
|-
 
|-
 
!colspan="2" style="background-color:#AFEEEE;"|Symbol
 
!colspan="2" style="background-color:#AFEEEE;"|Symbol
Line 19: Line 19:
 
|-
 
|-
 
|style="padding-left:1em;"|ValueX:
 
|style="padding-left:1em;"|ValueX:
|style="padding-left:1em;"|[[CFD Language#Data|Numeric]]
+
|style="padding-left:1em;"|[[CFD Language#Data|Integer]]
 
|-
 
|-
 
|style="padding-left:1em;"|ValueY:
 
|style="padding-left:1em;"|ValueY:
|style="padding-left:1em;"|[[CFD Language#Data|Numeric]]
+
|style="padding-left:1em;"|[[CFD Language#Data|Integer]]
 
|-
 
|-
 
!colspan="2" style="background-color:#AFEEEE;"|Outputs
 
!colspan="2" style="background-color:#AFEEEE;"|Outputs
 
|-
 
|-
 
|style="padding-left:1em;"|Result:
 
|style="padding-left:1em;"|Result:
|style="padding-left:1em;"|[[CFD Language#Data|Numeric]]
+
|style="padding-left:1em;"|[[CFD Language#Data|Integer]]
 
|-
 
|-
 
!colspan="2" style="background-color:#AFEEEE;"|Version [[CANNY Lab]]
 
!colspan="2" style="background-color:#AFEEEE;"|Version [[CANNY Lab]]
Line 37: Line 37:
 
<div style="min-height:100%;display:block;">
 
<div style="min-height:100%;display:block;">
 
<div style="float:left;width:70px;">
 
<div style="float:left;width:70px;">
[[Изображение:5_6_2_1.png|left|Иконка]]
+
[[File:5_6_2_1.png|left|Icon]]
 
</div>
 
</div>
  
 
<div>
 
<div>
Set the output result as the arithmetic subtracting the numerical value of the second output from the first.
+
Set the output as a result of arithmetic subtraction of the numerical value of the second output from the first.
 
</div>
 
</div>
 
</div>
 
</div>
Line 47: Line 47:
  
 
== Features ==
 
== Features ==
16-bit subtraction, with overflow (modulo 65535). In other words, the result of subtraction can be negative number, in case of 2nd input value more then 1st input value, the result will be the expression: X - Y + 65536.
+
16-bit subtraction, with overflow (modulo 65535). In other words, the result of subtraction can be negative number, in case of 2nd input value more than 1st input value, the result will be the expression: X - Y + 65536.
  
 
== Examples ==
 
== Examples ==
 
{|
 
{|
|[[Изображение:5_6_2_3.png|thumb|Пример 1]]
+
|[[File:5_6_2_3.png|thumb|Example 1]]
 
|
 
|
|[[Изображение:5_6_2_4.png|thumb|Пример 2]]
+
|[[File:5_6_2_4.png|thumb|Example 2]]
 
|}
 
|}
  

Latest revision as of 08:38, 8 April 2016

Appearance
5 6 2 2.png
Symbol
X - Y
Group
Arithmetic operations
Inputs
ValueX: Integer
ValueY: Integer
Outputs
Result: Integer
Version CANNY Lab
from 0.6b
Icon

Set the output as a result of arithmetic subtraction of the numerical value of the second output from the first.


Features

16-bit subtraction, with overflow (modulo 65535). In other words, the result of subtraction can be negative number, in case of 2nd input value more than 1st input value, the result will be the expression: X - Y + 65536.

Examples

Example 1
Example 2

See also

Addition

Multiplication

Division

Built-in Function Blocks