Book a Demo

Author Topic: Empty template  (Read 5844 times)

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Empty template
« on: December 09, 2004, 04:37:32 am »
Why doesn't this : %MID(classNotes,2,20)% generate enything?

also: can I use $something instead of an actual number in function macros?

is there eny posibility of arithmetic operations between variables?
« Last Edit: December 09, 2004, 05:37:28 am by MartinT »
Recursion definition:
If you don’t understand the definition read "Recursion definition".

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Empty template
« Reply #1 on: December 09, 2004, 01:15:40 pm »
According to the help... (Code Engineering | Code Templates | Code Template Syntax | Macros | Function Macros)

Quote
Parameters may be passed to function macros as:
  • string literals, enclosed within double quotation marks.  
  • direct substitution macros without the enclosing percent signs.  
  • variable references.

So it doesn't work because you've used literal numbers.  Instead you'll need to use %MID(classNotes,"2","20")%.  We realise that literal numbers would be much more intuitive, and we'll add support for that soon.

Simon

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Empty template
« Reply #2 on: December 18, 2004, 10:31:42 pm »
thanks
Recursion definition:
If you don’t understand the definition read "Recursion definition".

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Empty template
« Reply #3 on: December 19, 2004, 04:49:17 am »
can I make any arithmethics between variables (+,- and so)?
Can I some way move a parameter from template to template? or create my own template functions?
« Last Edit: December 19, 2004, 06:59:36 am by MartinT »
Recursion definition:
If you don’t understand the definition read "Recursion definition".

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Empty template
« Reply #4 on: December 19, 2004, 01:20:36 pm »
There's no arithmetic at the moment... Again, it will be added.

You shouldn't need to create a parameter to pass between templates because you should be able to recalculate it in the called template anyway.

If you're asking about your own function macros then no, you can't create your own.  You can email a request though.  You can create a custom template to act on if that helps.

What are you trying to achieve?  Maybe I (or someone else) can offer you some advice on how it can be achieved.

Simon

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Empty template
« Reply #5 on: December 21, 2004, 10:42:52 pm »
I need to format notes to fit doxygen.
This is a program that generates documantacion from notes, and it works with spesific formats.

this meins I have to format all notes templates to fit is.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

mbc

  • EA User
  • **
  • Posts: 237
  • Karma: +1/-0
  • Embedded software developer
    • View Profile
Re: Empty template
« Reply #6 on: December 22, 2004, 02:04:22 am »
Martin, you know that you can make EA output comments in javadoc format, right? Doxygen is able to read this.

Mikkel

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Empty template
« Reply #7 on: December 22, 2004, 02:15:43 am »
your right, that might be good abough in general.
but some tiems I need to make some manipulations not only on documantation (though it is right know my biggest concern). I'll take your advice for naw and check how dificult it is to manipulate (in general javadoc is enough).

but still I'll need thinks like this for code generation.

Thanks!!
Recursion definition:
If you don’t understand the definition read "Recursion definition".

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Empty template
« Reply #8 on: December 22, 2004, 04:30:40 am »
it seems it doesnt work so well...I'll need to manipulate it anyway...

Also :
1) how can I get the pachage notes -there's nothing like this in help.
2) How can I generate parent methods and att. (at least public) in child class?

thanks
« Last Edit: December 22, 2004, 05:32:49 am by MartinT »
Recursion definition:
If you don’t understand the definition read "Recursion definition".