Duplicating Library-Function Names

There are so many functions in the QuickC run-time library that it's sometimes difficult to avoid duplicating function names. For instance, if you write a function that reads data from a buffer, the name read may strike you as short and descriptive.

The only problem is that read is the name of a QuickC library function. A program that defines its own read function may work correctly at first, but if you later include the header file that declares the read library function,

#include <io.h>

then redefinition errors occur. You can't use the same name for two different functions. The solution here is to rename the user-defined function.

Summary: Use online help to check for function-name conflicts.

QuickC's online help lets you check for such name conflicts on the spot. Put the cursor on the function name you wish to use, then press F1. If the name is already used for a library function, online help displays information about the function. If the name isn't in online help, it's not used in the QuickC function library and is a safe choice.

Unless you're writing your own library functions, it's a good rule to avoid declaring names that begin with an underscore ( _ ), since many of the system-defined names in QuickC start with that character. (Non-ANSI library functions begin with a single underscore. Predefined identifiers such as __TIME__ start with two underscores, and routines internal to the C run-time library can begin with either one or two underscores.)