Book a Demo

Author Topic: Comment line in transformation templates  (Read 4445 times)

RoFr

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Comment line in transformation templates
« on: January 04, 2008, 05:18:01 am »
Hello,
I started adating the transformation templates to our needs.
It would be nice to e.g. just comment out a line, but yet I was not able to find out, how I can do this easily. Is there any possibility?

I checked also the existing templates, but all are without comment lines.

Any hint would be appreciated.

Robert

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Comment line in transformation templates
« Reply #1 on: January 04, 2008, 05:46:49 am »
Hi Robert,

AFAIK you just plain can't do this. I seem to remember an explanation from quite a while ago; something about how transformations were supposed to work. Essentially they transform everything, and the 'default' behavior is to output any text. I think that the way the language works there's a catch-22 in that the syntax for a comment could be confused by the input stream, or something like that.

[This was quite a while ago, so I could have forgotten the details, or I could be just plain wrong.]

[So if anyone knows how to do this, please chime in soon. That way Robert can ignore the rest of this post, and I can update my recollection.]

All that said, there really should be some way to comment these things. Transformations can easily become long, and quite complex, particularly when EA is used for something more than 'simply' transforming source code elements.

I've not seen a feature request on this issue, at least not recently. Perhaps you'd like to start one.

If so, use the Feature Request link below the Support link near the bottom of any forum page. It is a good idea to quote the title of this thread and paste in the URL; doing so will help Sparx participate in this discussion, and to monitor how much interest is voiced by other users.

If you do make the request, please post back to this thread to tell us you've started the ball rolling. And if you hear back from Sparx, please let us know what they have to say.

HTH, David
« Last Edit: January 04, 2008, 05:47:23 am by Midnight »
No, you can't have it!

thomaskilian

  • Guest
Re: Comment line in transformation templates
« Reply #2 on: January 04, 2008, 06:44:24 am »
I once had a chat with Sparx (was it Neil?) but it seems as if it got lost :(

The only "comment": assign a string to a dummy variable...

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Comment line in transformation templates
« Reply #3 on: January 04, 2008, 07:38:19 am »
EVERY coding mechanism MUST have the ability to provide comments...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

danm

  • EA User
  • **
  • Posts: 88
  • Karma: +0/-0
    • View Profile
Re: Comment line in transformation templates
« Reply #4 on: January 04, 2008, 10:30:14 am »
Right - you have to do $COMMENT (or as Thomas said $FOO, $blah or whatever)

Caveat - don't put usable code into the variable - it will be parsed!!!

So

$COMMENT="%linkGUID%" will be parsed and hell will break loose, you have to get rid of the "%"

Not great, it would be simple to yy comments I think, but it's the least of my worries.