TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Flowgorithm

Flowgorithm Logical Operators

Overview

In this tutorial, we will learn about Flowgorithm logical operators. Logical operators work on boolean operands. We can combine multiple conditions into a single boolean result. We can combine multiple conditional expressions using the operators.

Logical Operators

The Flowgorithm Logical operators are as follows:

 

Logical 

Operator

Operator  Symbol Description
Logical AND &&, AND, ∧ The AND operator is a binary operator. It requires two boolean conditional expressions that should be evaluated to be either True or False.

The Logical AND returns True If both the conditions are True. Otherwise, it will return False.

Logical OR  ||, OR, ∨ The Logical OR operator is also a binary operator. It requires two boolean conditional expressions that should be evaluated to be either True or False.

The Logical OR returns False If both the conditions are False. Otherwise, it will return True.

Logical NOT !, NOT, ¬ The Logical NOT operator is a unary operator. It requires only one boolean conditional expression.

The Logical NOT negates the given condition. It will return True if the condition is False. It will return False if the condition is True.

Example

Sample flowchart to demo logical operators:

Flowgorithm Logical Operator

Common Errors

Syntax Error

AND and OR conditional operators are binary operators. The operators require two boolean conditional expressions to evaluate the compound truth value. We get syntax errors if we omit or don’t supply two conditional expressions.

The AND operator requires two conditional expressions. In this example, the programmer supplied only one expression which results in an error.

Flowgorithm Syntax Error

Type Mismatch Error

The conditional operators operate on Boolean data types. The conditional expressions should have Boolean results i.e either True or False. In this example, the programmer is trying to use String datatypes along with conditional operators. This would result in a Type Mismatch error. The fix is to remove the quotes in the expressions.

For example, “age > 18”  enclosed within double quotes is a String data type in Flowgorithm and not a conditional expression.

Flowgorithm Type Mismatch Error

—

Flowgorithm Tutorials

Flowgorithm flowchart tutorials on this website:

https://www.testingdocs.com/flowgorithm-flowchart-tutorial/

Flowgorithm Website

For more information on the Flowgorithm tool, please visit the official website at:

http://flowgorithm.org/

Related Posts

Print Triangle Pattern Flowchart

Flowgorithm /

Print Triangle Pattern Flowchart

Flowgorithm Breakpoint Symbol

Flowgorithm /

Flowgorithm Conditional Breakpoint Statement

File Read Declare Variables

Flowgorithm /

Flowgorithm Read Numbers from File Example

File Search Input File Flowgorithm

Flowgorithm /

Search Text File Flowchart Example

Flowgorithm Turtle Graphics Symbols

Flowgorithm /

Flowgorithm Turtle Graphics Symbols

‹ Flowgorithm Arithmetic Operators› Convert Mass to Weight Flowchart

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version