Programming I version 1.5.3
Programming I C Library
Loading...
Searching...
No Matches
Data Fields
ByteOption Struct Reference

A byte option represents either a byte or nothing. More...

#include <basedefs.h>

Data Fields

bool none
 
Byte some
 

Detailed Description

A byte option represents either a byte or nothing.

Option types are typically used with functions that may return a value of the given type or nothing (i.e. the return value is optional). The none member is true if the value is not present. Otherwise the value can be accessed with the some member.

Example:

ByteOption op = index_of_byte_value(array, 123); // index of value 123?
if (op.none) {
printsln("value not found");
} else {
}
void printiln(int i)
Prints an integer followed by a line break.
void printsln(String s)
Prints a String followed by a line break.
A byte option represents either a byte or nothing.
Definition basedefs.h:170
Byte some
Definition basedefs.h:172
bool none
Definition basedefs.h:171
See also
make_byte_none
make_byte_some

Field Documentation

◆ none

bool ByteOption::none

◆ some

Byte ByteOption::some

The documentation for this struct was generated from the following file: