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

func bin

MPE documents

Complete PDF
Table of Contents
Index

E0201 Edition 4 ♥
E0300 Edition 3
E0692 Edition 3

Converts a string expression to return a binary value.

Syntax



   bin (strexp)

Formal Declaration



   bin:any (strexp:str)

Parameters


strexp

A string expression to be converted from ASCII into binary.

Examples



   %cmdebug > wl bin("1+2")
   %3

The contents of the string "1+2" are evaluated as an expression, and the result (3) is converted into a binary value.

Limitations, Restrictions


If the string parameter strexp contains an expression that, when evaluated, results in a string, the resulting string is returned. It is not converted into a binary value. For example:

   $nmdat > wl bin ('"A"+"B"')
   AB
   $nmdat > wl typeof(bin('"A"+"B"'))
   STR




func ascc


func bitd