Clone
Gustaf Neumann <neumann@wu-wien.ac.at>
committed
on 19 Dec 22
New feature: added support for return value checker for nsf::proc
One can now specify "-returns ...." in nsf::proc commands the same way
as … Show more
New feature: added support for return value checker for nsf::proc

One can now specify "-returns ...." in nsf::proc commands the same way

as in nx/XOTcl2 methods.

  nsf::proc ... /procName/ /arguments/ ?-returns /valueconstraint/? /body/

When return value checkers are defined, these are returned by the

usual introspection interface.

 % nsf::proc ::foo {-a:integer} -returns integer {return 1}

 % nsf::cmd::info definition ::foo

 ::nsf::proc ::foo -a:integer -returns integer {return 1}

 % nsf::cmd::info returns ::foo

 integer

The regression test was extended to cover these cases.

Show less

define-incrementals + 2 more