But what if I want the routine to return, on occasion, some values
calculated over these matrixes such as (for simplicity!) the number
of non-zero cells in the new matrix, B? Assume that this number is
being calculated within the -gprvector- routine in the local `cells':
Use the return statement (presuming that your program is r-class) and
you can return the objects as scalars or local macros. In fact you can
return matrices this way as well, which would be easier than doing it
with the syntax statement.
E.g. (for locals and scalars)
return local breaktype= "`brtype'"
return scalar tmin=`minbreak'
return scalar crit01=`crit01'
return scalar crit05=`crit05'
return local cmd= "zandrews"
return scalar tminobs=`minent'