nmh-workers
[Top] [All Lists]

Re: Request for comment: update to mh-format.5

2003-06-29 21:30:06
I've incorporated suggestions from Jerry Peek, and the new edition is 
attached.

I've eliminated the obtuse reference to 'argument mode', and tried to explain 
what the syntax is instead.  I believe it was to distinguish between 
functions/components used as escapes from functions/components used as 
arguments.

So 

       The  argument  to  a  function escape is processed in argument mode.  A
       function or component escape evaluated in argument mode should  not  be
       preceded  by  a  leading  `%'.   Conditional  escapes  (see  below) are
       allowed, and are entered normally.

is rendered as

       In addition to literal numbers or strings, the argument to  a  function
       escape can be another function, a component, or a control escape.  When
       the argument is a function or a component, they are  listed  without  a
       leading `%'.  When control escapes are used as function arguments, they
       written as normally, with a leading `%';

and 

       A  `%<'  or  `%?'  control escape causes its condition to be evaluated.
       This condition is a component or function escape evaluated in  argument
       mode.   The  control  escape  tests  whether  the function or component
       escape evaluates non-zero (for an integer-valued escape)  or  non-empty
       (for a string-valued escape).

is changed to 

       A  `%<'  or  `%?'  control escape causes its condition to be evaluated.
       This condition is a component or function.  For  integer  valued  func-
       tions  or  components,  the condition is true if the function return or
       component value is non-zero, and false  if  zero.   For  string  valued
       functions  or  components, the condition is true if the function return
       or component value is a  non-empty  string,  and  false  for  an  empty
       string.

and finally

       Most arguments not of type expr are required.  When escapes are  nested
       (via expr arguments), evaluation is done from inner-most to outer-most.
       As noted above, for the expr argument type, the evaluation is performed
       in  argument  mode:  the  leading `%' must be omitted for component and
       function escape arguments, and must be present (with a  leading  space)
       for control escape arguments.

is changed to

       Most  arguments not of type expr are required.  When escapes are nested
       (via expr arguments), evaluation is done from inner-most to outer-most.
       As  noted  above,  for the expr argument type, functions and components
       are written without a leading `%'.  Control escape arguments must use a
       leading `%', preceded by a space.

Attachment: mh-format.txt
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>