no way to escape pound sign

Posted By: pfeldman

no way to escape pound sign - 07/29/08 01:40

The online documentation on strings (at http://www.conitec.com/beta/astring.htm) says that the special sequence "#n" creates a sequence of n blanks. But, what if one wants the actual string "#1"? There doesn't seem to be any way of escaping the pound sign. This looks like a Lite-C design flaw.

Dr. Phillip M. Feldman
Posted By: croman

Re: no way to escape pound sign - 07/29/08 08:57

i'm not sure if i understood you well but you can define strings on this way too:

Code:
STRING* mystring = " "; // this string holds one empty place
STRING* mystring2 = "          "; // this string holds ten empty places

Posted By: Joozey

Re: no way to escape pound sign - 07/29/08 12:33

Indeed you can not initialise the string as plain "#1". But you could add a space in the front.

STRING* temptxt = " #1";

I can imagine you will get unaligned text when adding a space in front. And clipping the space off will be interpreted as "#1" again which doesn't show up. Report this in the bug forum if you want this fixed desperately smile.


Posted By: pfeldman

Re: no way to escape pound sign - 07/29/08 19:09

I actually want the pound sign to be displayed.
Posted By: pfeldman

Re: no way to escape pound sign - 07/29/08 19:10

OK. Thanks for confirming that this is a bug! I will report it.
© 2023 lite-C Forums