Difference between revisions of "Calculation Icon Properties"

From Flowcode Help
Jump to navigationJump to search
 
(11 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
+
<sidebar>Sidebar: Icon Properties</sidebar>
[[File:Calculation_Icon.gif]] &rarr; [[File:Calculation_Flowchart_Icon.png]] &rarr; [[File:Calculation_Properties.png]]
+
{| style="margin:auto; text-align:center;"
 
+
|-
 +
|[[File:Btn_Calculation.gif|border]]
 +
| width="50px" |&rarr;  
 +
|[[File:Gen_Calculation_Flowchart_Icon_01.png]]  
 +
|width="50px" |&rarr;  
 +
|[[File:Gen_Calculation_Icon_Properties_01.png]]
 +
|}
  
 
Calculation icons allow the modification of variables. They can be used to check inputs and to create outputs.
 
Calculation icons allow the modification of variables. They can be used to check inputs and to create outputs.
Line 13: Line 19:
 
'''Calculations'''
 
'''Calculations'''
  
One or more lines of calculations can be entered into this box
+
One or more lines of calculations can be entered into this box.
 +
 
 
All calculations must consist of the name of an existing variable, and equals sign and an expression made up from numbers, variables and the following operators:
 
All calculations must consist of the name of an existing variable, and equals sign and an expression made up from numbers, variables and the following operators:
  
Line 35: Line 42:
 
Numeric values can be in decimal (unmarked) or in HEX format (preceded by 0x) or in Binary format (preceded by 0b) e.g. 85 or 0x55 or 0b01010101.
 
Numeric values can be in decimal (unmarked) or in HEX format (preceded by 0x) or in Binary format (preceded by 0b) e.g. 85 or 0x55 or 0b01010101.
  
 +
 +
 +
'''Examples'''
  
 
Assuming that the variables have been previously defined, all the following are valid calculation lines.
 
Assuming that the variables have been previously defined, all the following are valid calculation lines.
Line 52: Line 62:
 
'''Variable and Function Box'''
 
'''Variable and Function Box'''
  
This section is used to either select a variable or access a list of the available functions. You can reference ports directly or select from a list of available Global or Local variables. You can also view the list of available functions for mathematical and string functions.
+
This section is used to either select a variable or access a list of the available functions. You can reference ports directly or select from a list of available Global or Local variables. You can also view the list of available functions for [[Mathematical Functions|mathematical]] and [[String Manipulation Functions|string]] functions.
 +
 
  
 +
====Video instructions====
 +
See the [http://www.youtube.com/watch?v=eycBIVJJiLc&list=PLQDWBb7bxuCgg6aJgPJcfXBMzZdLILceQ Calculation] video to learn how to use Calculation icon correctly with valid syntax, variables and expressions.
  
For a list of mathematical calculations and their explanations go to our Mathematical functions section.
+
<div align="center">
For a list of string manipulation calculations and their explanations go to our String manipulation functions section.
+
{{#ev:youtube|eycBIVJJiLc|640}}
 +
</div>

Latest revision as of 11:23, 1 September 2014

<sidebar>Sidebar: Icon Properties</sidebar>

Btn Calculation.gif Gen Calculation Flowchart Icon 01.png Gen Calculation Icon Properties 01.png

Calculation icons allow the modification of variables. They can be used to check inputs and to create outputs.


Display Name

The name of the icon that appears on the flowchart.


Calculations

One or more lines of calculations can be entered into this box.

All calculations must consist of the name of an existing variable, and equals sign and an expression made up from numbers, variables and the following operators:

(, ) - Parentheses.

=, <> != - Equal to, Not equal to.

+, -, *, /, % - Addition, Subtraction, Multiplication, Division & Modulus.

<, <=, >, >= - Less than, Less than or equal to, Greater than, Greater than or equal to.

>>, << - Shift right, Shift left.

~, &, |, ^ - Bitwise NOT, AND, OR, Exclusive OR

NOT,AND,OR,XOR - Bitwise NOT, AND, OR, Exclusive OR

&&, ||, ! - Logical AND, OR, NOT


Numeric values can be in decimal (unmarked) or in HEX format (preceded by 0x) or in Binary format (preceded by 0b) e.g. 85 or 0x55 or 0b01010101.


Examples

Assuming that the variables have been previously defined, all the following are valid calculation lines.


DELAY = DELAY + 1

DELAY = (MYVAR + 3) * 3

NEXTBIT = LASTBIT >> 2 & MASK

AANDB = PORT_A AND PORT_B

INVX = NOT X


Variable and Function Box

This section is used to either select a variable or access a list of the available functions. You can reference ports directly or select from a list of available Global or Local variables. You can also view the list of available functions for mathematical and string functions.


Video instructions

See the Calculation video to learn how to use Calculation icon correctly with valid syntax, variables and expressions.

{{#ev:youtube|eycBIVJJiLc|640}}