Length of a defined string
#4

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.
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)