Alright,
#define DECLARE_REG(name) reg name
DECLARE_REG(test) = 5.767;
works as expected. No space between identifier and open parenthesis, got it.
This compiles in C and prints the value, with the variable test_heyhey properly formed from two tokens.
int main()
{
#define DECLARE_REG(name) int name ## _heyhey
DECLARE_REG(test) = 69;
printf("%d", test_heyhey);
return 0;
}
When I try this in HISE, I try
#define DECLARE_REG(name) reg name ## _heyhey
DECLARE_REG(test2) = 69.6969;
and get an error saying "Unexpected character '#' in source"
How to do #define token concatenation in HISEScript, then? @Christoph-Hart