Menu

#448 A method's body can't contain empty lines (Object-Oriented Programming module)

v1.0 (example)
closed-fixed
nobody
None
5
2018-12-26
2017-08-16
Evan Aad
No

A method's body can't contain empty lines (i.e. \par's).

For example, the following plain TeX manuscript

\input pgf.tex %
\usepgfmodule{oo}%
\pgfooclass{C}{
    \method m(){

     }
}%
\bye

throws the error

Runaway argument?
{ 
! Paragraph ended before \method was complete.
<to be read again> 
                   \par 
<argument>  \method m(){ \par 
                              } 
\pgfooclass@ ... \pgfoo@methods =\pgfutil@empty #3
                                                  \def \pgfoo@temp@baseclass...
l.7 }
     %

The reason is that the \pgfoo@declaremethod macro in modules/pgfmoduleoo.code.tex is not defined as \long.

If this is the intended behavior, then it needs to be stated in the manual.

Discussion

  • Stefan Pinnow

    Stefan Pinnow - 2018-12-26
    • status: open --> closed-fixed
     
  • Stefan Pinnow

    Stefan Pinnow - 2018-12-26

    Thank you for reporting. This is incorporated now.

     
MongoDB Logo MongoDB