Logo GenPRES

MinMax Module

Creates a range from a pair of optional values, tests an optional value against a range, formats a range and reports inverted ranges.

Functions and values

Function or value Description

fromTuple minIncl maxIncl u (min, max)

Full Usage: fromTuple minIncl maxIncl u (min, max)

Parameters:
Returns: MinMax
minIncl : ValueUnit -> Limit
maxIncl : ValueUnit -> Limit
u : Unit option
min : RationalX option
max : RationalX option
Returns: MinMax

inRange minMax vu

Full Usage: inRange minMax vu

Parameters:
Returns: bool
minMax : MinMax
vu : ValueUnit option
Returns: bool

invertedRanges named

Full Usage: invertedRanges named

Parameters:
    named : (string * MinMax) list

Returns: string list

Returns a text for each named range whose minimum is above its maximum, with the name and both limits. A range with only a minimum, only a maximum or neither is never inverted.

named : (string * MinMax) list
Returns: string list

toString minInclStr minExclStr maxInclStr maxExclStr arg5

Full Usage: toString minInclStr minExclStr maxInclStr maxExclStr arg5

Parameters:
    minInclStr : 'a
    minExclStr : 'b
    maxInclStr : 'c
    maxExclStr : 'd
    arg4 : MinMax

Returns: string
Type parameters: 'a, 'b, 'c, 'd

Formats a MinMax as text, with the given labels for an inclusive or exclusive minimum and maximum. A value of 10,000 mg or mg/day or more is shown in g or g/day.

minInclStr : 'a
minExclStr : 'b
maxInclStr : 'c
maxExclStr : 'd
arg4 : MinMax
Returns: string

Type something to start searching.