22.01.2016, 13:03
You can't get length of defined string during compile time.
#if directive only supports comparison( >, >=, ==..etc) and simple algebric operations(+, -, * ...etc)
The functions like strlen are runtime functions not compile time so they won't work.
The way to do it is to make a string variable format the predefined string and use strlen on it at run-time code, as you have done using that print statement in your above post.
#if directive only supports comparison( >, >=, ==..etc) and simple algebric operations(+, -, * ...etc)
The functions like strlen are runtime functions not compile time so they won't work.
The way to do it is to make a string variable format the predefined string and use strlen on it at run-time code, as you have done using that print statement in your above post.