home *** CD-ROM | disk | FTP | other *** search
-
-
- NAME
- center -- center a string
-
- SYNOPSIS
- r = center(string, size);
- int r; starting column for centering
- char *string; string to center
- int size; width of field for centering
-
-
- DESCRIPTION
- This function returns the starting column to print a
- string for the string to be centered in a field of
- "size" characters. For the screen, the width would
- usually be 80, and for printers, either 80 or 132.
- The string MUST NOT BE longer than the size specified,
- since there is no error cheking for this condition and
- an unusable result will be returned.
-
-
-
- EXAMPLE
- char title[] = "Title of Program";
-
- main() {
- int i;
- i = center(title, 80);
- d_say(2, i, title); /* display title centered in row 2 */
- }
-
-
-
-
-
-
-
-
- This function is found in SMDLx.LIB for the Datalight Compiler
-