A89: Re: Unknown escape sequence '\p'?


[Prev][Next][Index][Thread]

A89: Re: Unknown escape sequence '\p'?




Hi!

> I am trying to compile my program using TIGCC (using the IDE).
> I am referring to a TIOS variable in a manner such as this 
> "SymFind($(main\\poo))". When I  compile it, it gives me the
> error "Unknown escape sequance '\p' ". It then proceeds to 
> compile it after giving this warning. It seems there is a bug 
> that it doesn't recognize "\\" (used to represent the \ 
> character in strings). Has anyone else experienced this?? 

He, he... very good question to be included in FAQ list.
See, when you use ANSI strings, you need to put double \,
i.e. to do "main\\poo". But $() macro constructor is implemented
using stringfication operator '#' which performs this task
automatically, so you need to put SymFind($(main\poo)), and it
will expand into a correct sequence. When you use $(main\\poo)
it become main\\\poo, so '\p' is an invalid sequence. This is
not a bug, this is a feature of '#' operator. Anyway, it need
to be quoted in the documentation.

Cheers,

Zeljko Juric