I cannot find the answer to the following question in Knuth's Metafont book.
The following definition with a trailing text argument:

def mydef (expr a, b, c) text modifier =
        if <modifier = empty>: 
        else:
        fi
enddef;

How can I do the switch on an empty or nonempty modifier argument? It is not a 
string because calling its length fails with an error.
I must do the switch, because "fill modifier" with an empty "modifier" gives 
horrible results.

Usage would be calls like:
  mydef(1,2,3) withcolor green; % with modifier text
  mydef(1,2,3); % without modifier text

Thanks in advance.
Hans van der Meer

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to