omdl  v0.6.1
OpenSCAD Mechanical Design Library

Iterable data type identification. More...

+ Collaboration diagram for Iterables:

Files

file  datatypes-base.scad
 Include file wrapper of data types base primitives.
 

Functions

function all_equal (v, cv)
 Test if a list of values equal a comparison value. More...
 
function any_equal (v, cv)
 Test if any element of a list of values equal a comparison value. More...
 
function all_defined (v)
 Test if no element of a list of values is undefined. More...
 
function any_undefined (v)
 Test if any element of a list of values is undefined. More...
 
function all_scalars (v)
 Test if all elements of a list of values are scalars. More...
 
function all_lists (v)
 Test if all elements of a list of values are lists. More...
 
function all_strings (v)
 Test if all elements of a list of values are strings. More...
 
function all_numbers (v)
 Test if all elements of a list of values are numbers. More...
 
function all_len (v, l)
 Test if all elements of a list of values are lists of a specified length. More...
 

Detailed Description

Iterable data type identification.

See validation results.

Function Documentation

function all_defined ( )

Test if no element of a list of values is undefined.

Parameters
v<list> A list of values.
Returns
<boolean> true when no element is undefined and false otherwise.
Warning
Always returns true when the list is empty.

+ Here is the caller graph for this function:

function all_equal ( ,
cv   
)

Test if a list of values equal a comparison value.

Parameters
v<list> A list of values.
cv<value> A comparison value.
Returns
<boolean> true when all elements equal the value cv and false otherwise.
Warning
Always returns true when the list is empty.
function all_len ( ,
 
)

Test if all elements of a list of values are lists of a specified length.

Parameters
v<list> A list of values.
l<integer> The test length.
Returns
<boolean> true when all elements are lists of the specified length and false otherwise. Returns true when the list is a single list of length l.
Warning
Always returns true when v is empty.
function all_lists ( )

Test if all elements of a list of values are lists.

Parameters
v<list> A list of values.
Returns
<boolean> true when all elements are lists and false otherwise. Returns true when the list is a single list value.
Warning
Always returns true when the list is empty.
function all_numbers ( )

Test if all elements of a list of values are numbers.

Parameters
v<list> A list of values.
Returns
<boolean> true when all elements are numerical values and false otherwise. Returns true when the list is a single numerical value.
Warning
Always returns true when the list is empty.
function all_scalars ( )

Test if all elements of a list of values are scalars.

Parameters
v<list> A list of values.
Returns
<boolean> true when all elements are scalar values and false otherwise. Returns true when the list is a single scalar value.
Warning
Always returns true when the list is empty.
function all_strings ( )

Test if all elements of a list of values are strings.

Parameters
v<list> A list of values.
Returns
<boolean> true when all elements are string values and false otherwise. Returns true when the list is a single string value.
Warning
Always returns true when the list is empty.
function any_equal ( ,
cv   
)

Test if any element of a list of values equal a comparison value.

Parameters
v<list> A list of values.
cv<value> A comparison value.
Returns
<boolean> true when any element equals the value cv and false otherwise.
Warning
Always returns false when the list is empty.
function any_undefined ( )

Test if any element of a list of values is undefined.

Parameters
v<list> A list of values.
Returns
<boolean> true when any element is undefined and false otherwise.
Warning
Always returns false when the list is empty.

+ Here is the caller graph for this function: