22.01.2016, 12:09
Hi,
Is is possible to get the length of a defined string using any of the PAWN Pre-Processor directives?
For example, I want to do something like this:
This is useful because Pawn compiler would alert me whenever I type something bigger than it should be.
Any clue?
Is is possible to get the length of a defined string using any of the PAWN Pre-Processor directives?
For example, I want to do something like this:
Код:
#define MODE_NAME "LVDM" #if strlen(MODE_NAME) > 32 #error "Define a shorter name." #endif
Any clue?