tsb

package
v0.28.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2025 License: GPL-3.0 Imports: 0 Imported by: 0

README

TSB

Tri-State Boolean

TSB means a Tri-State Boolean.

It can also be called as Three-Valued Logic (TVL).
More information about T.S.B. can be found in Wikipedia:
https://en.wikipedia.org/wiki/Three-valued_logic

Documentation

Index

Constants

View Source
const (
	Yes   = TSB(1) // Binary value: 0001.
	No    = TSB(2) // Binary value: 0010.
	Maybe = TSB(3) // Binary value: 0011.
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TSB

type TSB byte

TSB is a tri-state boolean.

func (TSB) IsMaybe

func (b TSB) IsMaybe() bool

IsMaybe tells whether the TSB is 'maybe'.

func (TSB) IsNo

func (b TSB) IsNo() bool

IsNo tells whether the TSB is 'no'.

func (TSB) IsSet

func (b TSB) IsSet() bool

IsSet tells whether the TSB has a valid value. This method is used for compatibility with binary computers.

func (TSB) IsYes

func (b TSB) IsYes() bool

IsYes tells whether the TSB is 'yes'.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL