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

A double option represents either an double or nothing. More...

#include <basedefs.h>

Data Fields

bool none
 
double some
 

Detailed Description

A double option represents either an double 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:

DoubleOption op = index_of_double_value(array, 0.5, EPSILON); // index of value 0.5?
if (op.none) {
printsln("value not found");
} else {
}
#define EPSILON
A very small positive value.
Definition base.h:956
void printsln(String s)
Prints a String followed by a line break.
void printdln(double d)
Prints a double followed by a line break.
A double option represents either an double or nothing.
Definition basedefs.h:191
bool none
Definition basedefs.h:192
double some
Definition basedefs.h:193
See also
make_double_none
make_double_some

Field Documentation

◆ none

bool DoubleOption::none

◆ some

double DoubleOption::some

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