Wafl Home

Primitive Data Types Tutorial

Conversion to Float Type

Function asFloat(x) converts Integer value x to appropriate Float value.

Function asFloat(x) converts String value x, representing a valid float, to appropriate Float value.

Function asFloat(x) converts Bool value true to value 1.0 and value false to 0.0.

Source code:

{#
asFloat(7),
asFloat('6.2'),
asFloat(true),
asFloat(false)
#}

Result:

{# 7.000000, 6.200000, 1.000000, 0.000000 #}

 

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.