Author Topic: WRAP and WRAP_COMMENT macro problem  (Read 2775 times)

jmhaapasa

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
WRAP and WRAP_COMMENT macro problem
« on: May 17, 2005, 09:02:08 am »
The macros don't seem to work in EA 5.x. For example in
Code: [Select]

%if genOptGenComments != "T"%
%endTemplate%

%PI=""%
$wrapLen = %genOptWrapComment%
$style = %genOptCPPCommentStyle%
%if $style == "XML.NET"%
%XML_COMMENT($wrapLen)%
%elseIf $style == "JavaDoc"%
/**\n
%WRAP_COMMENT( classNotes, "80", "", "" )%
\n*/
%else%
%CSTYLE_COMMENT($wrapLen)%
%endIf%

the WRAP_COMMENT macro expands to nothing.

I'm trying to generate doxygen-compliant comments, but with a lighter notation than the built-in javadoc macro.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: WRAP and WRAP_COMMENT macro problem
« Reply #1 on: May 17, 2005, 08:23:07 pm »
Thanks for letting us know of this problem.

I've fixed the bug where WRAP_COMMENT wouldn't work.

The problem with WRAP is with the documentation.  That function doesn't exist.  Instead there is a function called WRAP_LINES that takes the same parameters as WRAP plus an extra one for something to put at the end of the line.  I'll make sure that the documentation is corrected for the next build.

In the mean time you can change WRAP_COMMENT to WRAP_LINES in your template and it should work as you intend.  (You should also see that WRAP_LINES is syntax highlighted.)

Hope this helps.

Simon

jmhaapasa

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: WRAP and WRAP_COMMENT macro problem
« Reply #2 on: May 17, 2005, 10:34:37 pm »
Thanks. I was a bit suspicious when WRAP wasn't highlighted.

WRAP_LINES works for us.