Go to the source code of this file.
|
function | islenleq (in varval, in maxlen) |
| Return true if and only if the input varval has the specified maximum size maxlen , Otherwise, return false . More...
|
|
◆ islenleq()
function islenleq |
( |
in |
varval, |
|
|
in |
maxlen |
|
) |
| |
Return true
if and only if the input varval
has the specified maximum size maxlen
, Otherwise, return false
.
This routine is primarily used within the procedures of the ParaMonte library for type introspection and verification in high-level programming languages.
- Parameters
-
[in] | varval | : The input value whose length is to verified to be less than or equal to the input value maxlen .
Beware that,
-
an input scalar string has a length of
1 .
-
an input scalar value has a length of
1 .
-
the length of a non-scalar object is measured by the MATLAB intrinsic
numel() .
|
[in] | maxlen | : The input positive scalar MATLAB integer representing the maximum allowed size of the input value varval .
|
- Returns
itis
: The output scalar MATLAB logical that is true
if and only if the input varval
has a length that is less than or equal to the specified maximum size maxlen
, otherwise, it is false
.
Possible calling interfaces ⛓
itis = pm.introspection.islenleq(varval, maxlen)
- See also
- pm.introspection.verify
pm.introspection.verified
pm.introspection.islenleq
pm.introspection.istype
Example usage ⛓
1cd(fileparts(mfilename(
'fullpath'))); % Change working directory to source code directory.
2addpath(
'../../../'); % Add the ParaMonte library
root directory to the search path.
4disp(
'pm.introspection.islenleq(10000, 1)')
5disp( pm.introspection.islenleq(10000, 1) )
7disp('pm.introspection.
islenleq([1, 0], 2)')
8disp( pm.introspection.
islenleq([1, 0], 2) )
10disp('pm.introspection.
islenleq(false, 1)')
11disp( pm.introspection.
islenleq(false, 1) )
13disp('pm.introspection.
islenleq("This is the description", 1)')
14disp( pm.introspection.
islenleq("This is the description", 1) )
16disp('pm.introspection.
islenleq("value", 1)')
17disp( pm.introspection.
islenleq("value", 1) )
19disp('pm.introspection.
islenleq([1, 2], 1)')
20disp( pm.introspection.
islenleq([1, 2], 1) )
22disp('pm.introspection.
islenleq(1 + 2i, 1)')
23disp( pm.introspection.
islenleq(1 + 2i, 1) )
function islenleq(in varval, in maxlen)
Return true if and only if the input varval has the specified maximum size maxlen,...
function root()
Return a scalar MATLAB string containing the root directory of the ParaMonte library package.
Example output ⛓ 1pm.introspection.islenleq(10000, 1)
3pm.introspection.islenleq([1, 0], 2)
5pm.introspection.islenleq(
false, 1)
7pm.introspection.islenleq(
"This is the description", 1)
9pm.introspection.islenleq(
"value", 1)
11pm.introspection.islenleq([1, 2], 1)
13pm.introspection.islenleq(1 + 2i, 1)
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
- Copyright
- Computational Data Science Lab
- Author:
- Joshua Alexander Osborne, May 21 2024, 5:47 PM, University of Texas at Arlington
Fatemeh Bagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.
Amir Shahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin