use enum in const char[] declaration

Hello, I'm trying to use an enum value inside a const char[] declaration but without luck:

enum test { ME };

const char line[] PROGMEM = "enumvalue of me: " ME " it is";

I think it must be possible as at compiletime all sizes are known and the result is a fixed length constant.

What would be the correct syntax?

Regards,
PeterV

It looks to me like you are trying to concatenate a number with a string and to make things worse you are trying to do it within a variable declaration and add to the problem you are trying to put it in PROGMEM

Is that really likely to work ?

What problem are you trying to solve by doing this ?

UKHeliBob:
It looks to me like you are trying to concatenate a number with a string and to make things worse you are trying to do it within a variable declaration and add to the problem you are trying to put it in PROGMEM

Yes, this is exactly true.
If this works it saves development and processor time. No need to concatenate strings at runtime. If there's an int to char[] preprocessor directive it would work. I'm a long time developer but not in C/C++, i'm learning. I need some enum values in javascript, this is how I can combine them in

How about something like this

enum {aValue, anotherValue};
char buffer[40];

void setup()
{
  Serial.begin(115200);
  sprintf(buffer, "aValue is %d, anotherValue is %d", aValue, anotherValue);
  Serial.println(buffer);
}

void loop()
{
}

Something like that is what i have and it works but I want to optimize the code. Thats why I ask if it would be possible. Looks to me that the preprocessor / compiler should be capable of doing these kind of things as all sizes / values are known. But if not, ok, I skip the idea.