Tuesday, March 1, 2011

Printing funky text using C program part 1

Author: Joe Patner:dvd ripper

 

Ladies and gentlemen, I give you the following: Ta da!  I am a text string.

It’s a simple collection of text, numbers, letters, and other characters — but it’s not a string of text. Nope. For those characters to be considered as a unit, they must be neatly enclosed in double quotes:
“Ta da!  I am a text string.”

Now you have a string of text, but that’s still nothing unless the computer can manipulate it. For manipulation, you need to wrap up the string in the bunlike parentheses: (“Ta da!  I am a text string.”)

Furthermore, you need an engine — a function — to manipulate the string. Put printf on one side and a semicolon on the other:
printf(“Ta da!  I am a text string.”);

And, you have a hot dog of a C command to display the simple collection of text, numbers, letters, and other characters on the screen. Neat and tidy.

Consider this rabble:  He said, “Ta da! I am a text string.”

Is this criminal or what? It’s still a text string, but it contains the double-quote characters. Can you make that text a string by adding even more double quotes? “He said, “Ta da! I am a text string.””

Now there are four double quotes in all. That means eight tick marks hovering over this string’s head. How can it morally cope with that?
“”Damocles” if I know.”

The C compiler never punishes you for “testing” anything. There is no large room in a hollowed-out mountain in the Rockies where a little man sits in a chair looking at millions of video screens, one of which contains your PC’s output, and, no, the little man doesn’t snicker evilly whenever you get an error. Errors are safe! So why not experiment?

 

Welcom to reproduce this passage. Please indicate the source.
Source:Seo Research Blog
Links resources:dvd to flv 

No comments:

Post a Comment