<< slr slr slr_comments_to_xml >>

slr >> slr > slr_check_arg

slr_check_arg

Performs some tests on an argument.

Syntax

slr_check_arg(arg, arg_name, tests)
[ok, msg] = slr_check_arg(arg, arg_name, tests)

Parameters

arg

the variable to be tested

arg_name (string)

its name

tests (list)

a list containing the tests to be performed

ok (boolean)

answer of the tests

msg (string)

error message associated with the first failed test.

Examples

tests = list('type',['constant'])
slr_check_arg(1, 'a', tests)


Report an issue
<< slr slr slr_comments_to_xml >>