Wafl Home

Primitive Data Types Tutorial

Comparison Operators

Comparison operators are defined for Integer, Float and String types.

The equality of two values is tested using = or ==. To test if two values are different one can use either != or <>. Usual relational operators are supported: <, >, <= and >=.

Source code:

{#
1 < 2,
1.2 <= 2.3,
"abcd" > "ABCD",
"abcd" >= "AB",
21 * 2 = 42,
21 == 42 / 2,
17 != 18,
-3.14 <> 3.14
#}

Result:

{# true, true, true, true, true, true, true, true #}

 

Table of Contents

Let's Start

Program Structure

Primitive Data Types

List

Tuple

Record

HTML

Command Line Interpreter

Using Web Servers

Syntax

Examples

Tips

The most of examples evaluates with both command line and Web server Wafl interpreters. If any example is based on specific features of an interpreter, it is explicitly annotated.