Length of a defined string
#1

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:

Код:
#define MODE_NAME "LVDM"

#if strlen(MODE_NAME) > 32
    #error "Define a shorter name."
#endif
This is useful because Pawn compiler would alert me whenever I type something bigger than it should be.

Any clue?
Reply


Messages In This Thread
Length of a defined string - by paulomu300 - 22.01.2016, 12:09
Re: Length of a defined string - by xTURBOx - 22.01.2016, 12:35
Re: Length of a defined string - by paulomu300 - 22.01.2016, 12:53
Re: Length of a defined string - by BroZeus - 22.01.2016, 13:03
Re: Length of a defined string - by paulomu300 - 22.01.2016, 13:34
Re: Length of a defined string - by AmigaBlizzard - 22.01.2016, 15:18

Forum Jump:


Users browsing this thread: 1 Guest(s)