dos_compilers/Microsoft QuickC v2/SAMPLES/SAMPLES.DOC

75 lines
3.4 KiB
Plaintext
Raw Normal View History

2024-07-02 15:32:02 +02:00
SAMPLES.DOC File
QuickC (R) Compiler, Version 2.01
===========================< Samples List >================================
In addition to the reference and "C For Yourself" examples in the QC
Advisor, the following sample programs are provided with QuickC.
Files Description
----- -----------
GRDEMO.MAK GRDEMO illustrates general graphics techniques
GRDEMO.C including drawing, animation, palette
MENU.C switching, window adjustment, menus, and
MENU.H turtle graphics. The MENU and TURTLE modules
TURTLE.C are independent modules that could be used
TURTLE.H in your own programs.
LIFE.MAK LIFE illustrates general C and inline assembler
LIFE.C techniques. In particular, it shows how to write
TOOLS.C entire screens to the screen buffer. The TOOLS
TOOLS.H module contains independent functions and
macros that could be used in your own programs.
CHRTDEMO.MAK CHRTDEMO illustrates presentation graphics
CHRTDEMO.C techniques. You can use this program as a tool
CHRTOPT.C for testing different modes and options before
CHRTSUPT.C building them into your own programs.
CHRTDEMO.H
CRLF.C CRLF is a tool for converting certain files that
can not be loaded into the QC environment. It
removes unwanted control characters and ensures
that each line is terminated by a carriage-return/
line-feed pair. CRLF.EXE is also provided on the
utilities disk.
======================< Note on Graphics Libraries >=======================
GRDEMO and LIFE require GRAPHICS.LIB. CHRTDEMO requires GRAPHICS.LIB
and PGCHART.LIB. If you did not request these libraries in your
combined library files during setup, you will get "unresolved
external" linker errors when you try to compile the programs.
If you are using the QC environment, you must add the appropriate
library names to the program list (.MAK) files. For example, if you
want to compile LIFE, select Edit Program List from the Make menu. A
dialog box will appear showing the contents of the LIFE.MAK program
list. Enter the name GRAPHICS.LIB at the File Name prompt and select
the Save List button.
If you are using QCL, specify the library names on the command line.
For example, use this command line to compile LIFE:
QCL life.c tools.c graphics.lib
======================< Note on Naming Conventions >=======================
Two example programs, CHRTDEMO and GRDEMO, use a subset of the naming
conventions used in OS/2 and Windows include files. In this
convention, the first character of an identifier is a lowercase letter
called a prefix. Common prefixes include p (pointer), a (array), i
(index), and c (count). After the prefix, there may be an additional
lowercase tag, usually indicating type. Common tags include ch (char),
f (flag), sz (zero-terminated string) l (long), and x or y (x or y
coordinate). Following this there may be one or more qualifiers, each
beginning with an uppercase letter. For example, an identifier called
achFileName is an array (a) of characters (ch) containing a file name
(FileName).