HPlogo System Debug Reference Manual > Chapter 10 System Debug Standard Functions

func bool

MPE documents

Complete PDF
Table of Contents
Index

E0201 Edition 4 ♥
E0300 Edition 3
E0692 Edition 3

Coerces an expression into a Boolean value.

Syntax



   bool (value)

Formal Declaration



   bool:bool (value:any)

Parameters


value

An expression to be coerced. Its type can be anything except STR. The coercion will evaluate to FALSE if the value of the expression is 0; otherwise, the value of the coercion will be TRUE.

Examples



   $nmdebug > wl bool(0)
   FALSE

   $nmdebug > wl bool(1)
   TRUE

   $nmdebug > wl bool(123)
   TRUE

   $nmdebug > wl bool(a.c00023c4)
   TRUE

   $nmdebug > wl bool(0.0)
   FALSE

Limitations, Restrictions


none




func bitx


func bound