^PRINTF^ is a C library function which priovides formatted output on the
screen.
 
Syntax :
        printf(format [,arg1] [,arg2] ...);
        char *format;
 
       <format> is a string contain characters to copy to the screen.
       We shall see that it can also contain formatting cahracters for
       'pretty' output on the screen.
 
       For example, ^printf("Hello");^ displays "Hello" on the screen.
Note that the cursor does not move on to the next line after displaying
"hello".
        So,  ^printf("Hello"); printf("how are you ?");^  displays
"Hellohow are you".
        To make this look sensible, use  ^printf("Hello\n");^
^printf("how are you ?");^.  Then the following will appear:
 
Hello
how are you ?
 
The pair of characters  \n  mustn't be split up. They indicate a new line.  
This is equivalent to writing ^printf("Hello\nhow are you ?");^.
Such two character sequences are used for characters that aren't printable
or are otherwise difficult to obtain. As well as \n meaning new line, we
have  \t for tab,  \b for backspace, \" for quotes, and \\ for backspace
itself. In addition every ASCII character can be displayed using backslash
followed by the ASCII code in base 8 or 16. For example to write the
character with ASCII code 255 (255=377 in base 8 and FF in base 16), you
can use ^printf("\0377");^ or ^printf("\0xFF");^. 
 
 
        Printf can also be used to diplay the values of arithmetic expressions
        or variables. The example below declares a variable and then displays
        its value on the screen.
         
        ^ main()                  ^
        ^ {                       ^
        ^ int i;                  ^
        ^        i = 50;          ^
        ^        printf("%d", i); ^
        ^ }                       ^
 
        Ok, this is the way this program works: 
printf  has two parameters. "%d" means that n integer is to be displayed
on the screen. The number to be written is the second parameter to the
function. Running the program gives the following display on the screen:
 
50
 
        If you replace "%d" with   "the value is :%d !!!", then this will
        appear:
 
the value is :50 !!!
 
        So %d is replaced with the value of the integer variable i.
 
        In the same way, the following program :
 
        ^ main()                                                           ^
        ^ {                                                                ^
        ^ int i, j, k;                                                     ^
        ^        i = 50;                                                   ^
        ^        j = 90;                                                   ^
        ^        k = 12586;                                                ^
        ^        printf("The three numbers are :%d, %d and %d.", i, j, k); ^
        ^ }                                                                ^
 
        displays on the screen :
 
The three numbers are : 50, 90 and 12586.
 
 
        You can also write things other than integers on the screen.
        Thus,
 
        ^printf("pi = %f", atan(1.0)*4);^
 
        writes :
 
        pi = 3.141593
 
        %f  indicates a floating point number.
 
 
        Now for the technical specification of the printf function.
        printf(format, arg1, arg2, ...);
        produces a string that is displayed on the screen inder the control
        of the <format> string. <format> contains ordinary characters that
        are simply copied to the screen and conversion specifications which
        specify the format of the other arguments.
 
        Conversion specifications have the form:
 
        %[-][min][.max]type
 
        The optional - sign indicates that the item is to be left-justified
        within the given field. Right-justification is the default.
 
        The optional min field is a decimal integers giving the minimum width
        of the field. If the converted value of the argument is shorted than
        this value then blanks are added. Otherwise the field is the same
        length as the field. If min starts with a zero, the characters added
        are zeros rather than spaces. 
        
        The optional .max field gives the maximum size of this field when
        writing a string. If the string is longer, it will be truncated.
        When used for real numbers, this field gives the number of digits
        after the decimal point.
 
        Finally, there is a format letter, from the following list:
        
        d  writes a decimal integer (of type char, short, int or long).
        o  writes an integer in base 8 (of type char, short, int or long).
        x  writes base 16 (of type char, short, int or long).
        c  writes a character (type char).
        s  writes a string.
        f  writes a real (of type float or double) without using exponential
           notation.
        e  writes a real in exponential notation.
        g  writes a real in f or e format using which ever needs the fewest
           characters.
 
 
        Examples :
 
        ^printf("To-day is the : %d/%02d/%02d\n",day,month,year);^
        writes : To-day is the : 5/01/87
 
        ^printf("<%s><%5s><%.5s>", "loriciels","loriciels","loriciels");^
        writes : <loriciels><loriciels><loric>
 
        ^printf(">%5s.%c\n>%-5s.", "abc", 'd', "abc");^
        writes : >  abc.d
                 >abc  .
