[NTG-context] MetaFun: how to check the number of arguments

Jeong Dal haksan at me.com
Wed Jan 16 15:32:46 CET 2019


Dear Hans,

> vardef textlength(text t) =
>    save n ; n := 0 ;
>    for i = t :
> 	n := n + 1 ;
>    endfor;
>    n
> enddef;
> 

Thank you for a  good method!
It can be used in another program.

Best regards,

Dalyoung


More information about the ntg-context mailing list