Santosh Vernekar wrote:
> "#s" will return the literal being passed and not its value.
> 
> So for
>     #define STR(s) #s
> usage
>     STR(a) will return string "a"
>     STR(ab) will return string "ab"
> 
> 
> -SV

"return" is perhaps a poor choice for a word to describe what happens. 
#define is a macro preprocessor statement.  The macro preprocessor 
is...dumb.  It is mostly a compile-time "search-and-replace" tool.  So, 
in this case, if the preprocessor finds a STR(a) in the code, it 
replaces it with the quoted string "a".

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to