Book a Demo

Author Topic: Function Macro issue  (Read 2666 times)

sbarkeruk

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Function Macro issue
« on: April 07, 2005, 07:21:38 am »
When using the Code Generation Templates, the Function Macro VB_COMMENT does not quite work correctly. This is appending two single quote characters in front of the text, instead of just one (that is the normal practise in VB6).

So '' My Comments is generated instead of ' My Comments.

In my case I was referring to the Operation element Notes (as in Code Generation Templates | Visual Basic | ClassNotes) but suspect that this is a global issue with the macro.

Simon.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Function Macro issue
« Reply #1 on: April 07, 2005, 04:10:11 pm »
Not sure why we generate the two quotes, but you can generate it with one either by calling REPLACE on the result or by using WRAP_COMMENT instead.

WRAP_COMMENT(<comment>, <wrap_length>, <indent>, <start_string>)
Wraps the text <comment> at width <wrap_length> putting <indent> and <start_string> at the beginning of each line.

Note that <wrap_length> must still be pass as a string, even though WRAP_COMMENT treats this parameter as an integer.  

Simon

sbarkeruk

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: Function Macro issue
« Reply #2 on: April 08, 2005, 01:02:23 am »
Thanks, will have a go with your suggested methods in the meantime.

However, if VB_Comment function macro is only used for VB (as it's name suggests) then perhaps this should be modified for a future release to write only one single quote instead of 2? If this is also intended for use with VB.Net then the same would apply (VB.Net also uses just one single quote for comments).

Simon

BTW Big praise for the speed and detail of responses on this forum. As you have probably noticed from my other postings, I am evaluating 4 tools at the moment and yours has far, far superior support - even when compared against the biggest names (no offence). Excellent stuff.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Function Macro issue
« Reply #3 on: April 11, 2005, 03:27:00 pm »
Quote
BTW Big praise for the speed and detail of responses on this forum. As you have probably noticed from my other postings, I am evaluating 4 tools at the moment and yours has far, far superior support - even when compared against the biggest names (no offence). Excellent stuff.

Thank you and no offence taken.  (We'll just have to work at becoming the biggest name :))