Quote:
>>>>> On 30 May 1997 16:15:09 GMT
Dirk> 1. I wanted to print out the character '%'. Not a problem at all when
Dirk> using 'puts'. But 'puts' is sooo slow. So I tried printf:
That's interesting. I had expected puts being somewhat faster....
Dirk>
Dirk> 2. When using 'printf' the '%'-character is evaluated. So I picked
Dirk> up my big book on C and looked up: "Use '%%' to print a single '%'".
Dirk> I did so and it worked... a little. Unfortunately I encountered a
Dirk> very strange behaviour when trying to highlight the output:
Dirk> '\033[1m%%\033[m'
Dirk>
Dirk> Any following character is typed twice. What's going on here
Don't know. Probably, your escape sequence switches on some echo mode
on your display driver. I don't believe that this is related to C.
Dirk>
Dirk> 3. Is there another solution which I have not found yet? It should
Dirk> be fast, working on a PC and be able to admid all the funny things
Dirk> ansi-codes can do.
How about this:
printf("%s\n","put here as many % as you want");
Dirk>
Dirk> 4. How can I hide the cursor and show it again. The flickering while
Dirk> printing a long string on the screen is really annoying.
This question is not related to C, and it depends on the platform you
are using (among others), so I suggest you post this on an appropriate
newsgroup.
--
Ronald Otto Valentin Fischer (PGP public key available on request)
http://ourworld.compuserve.com/homepages/ronald_fischer/