Book a Demo

Author Topic: void parameter  (Read 4029 times)

MREA

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
void parameter
« on: November 06, 2012, 06:25:01 pm »
hi again

I imported C-code with operations like op1(void)
EA only import op1() without void, no problem so far, but how could I regenerate the void in the code?(without modify all elements)
« Last Edit: November 06, 2012, 06:26:25 pm by EAIFM »
Support- Languages: German, English, French

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: void parameter
« Reply #1 on: November 06, 2012, 07:58:25 pm »
Is it really necessary that you're generating function signatures using 'void' to specify empty parameter lists?? Do you have to support such old C compilers?
You can at least provide this behavior in your code generation templates. First put the results of the parameter list to a variable, then check if this variable is empty and replace with 'void' in this case.

MREA

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: void parameter
« Reply #2 on: November 06, 2012, 08:06:07 pm »
ahh thanks! I thought list are all parameters of all functions.
Do not know where I got this Idea from.
Thanks for your post! you helped a lot
Support- Languages: German, English, French