up: STATUS     index Zimbu documentation

CLASS T.status @public

summary

     

The builtin type status. It has either the value FAIL or OK.

The object methods can be used on a status variable or value:

 IO.print("It did " .. FAIL.ToString())

$ToString() string @public  Return either "OK" or "FAIL".
$ToString(format) string @public  When format is "1t" output "0" and "1" instead of "FAIL" and "OK"..
$Size() int @public  Return the number of bytes in a status.
$Type() type @public  Return the type of the status.
$Compare(other) int @public  Return -1 when other is OK and this status is FAIL, zero when other is equal to this status, and 1 when other is FAIL and this status is OK.
$Equal(other) bool @public  Return TRUE when other is equal to this status.
 
 

members (alphabetically)

     

FUNC $Compare(status other) int @public

     

Return -1 when other is OK and this status is FAIL, zero when other is equal to this status, and 1 when other is FAIL and this status is OK.

FUNC $Equal(status other) bool @public

     

Return TRUE when other is equal to this status.

FUNC $Size() int @public

     

Return the number of bytes in a status.

Always returns 1.

FUNC $ToString() string @public

     

Return either "OK" or "FAIL".

FUNC $ToString(string format) string @public

     

When format is "1t" output "0" and "1" instead of "FAIL" and "OK"..

format must either be "t", in which case it works just like ToString(), or "1t", in which case it returns "0" for FAIL and "1" for OK.

FUNC $Type() type @public

     

Return the type of the status.

license

      Copyright 2013 Bram Moolenaar All Rights Reserved.

      Licensed under the Apache License, Version 2.0. See the LICENSE file or obtain a copy at: http://www.apache.org/licenses/LICENSE-2.0