#Contemplating the void
31-Mar-86 17:13:15
Sb: #13267-#Contemplating the void
Fm: Dave Haynie/C128 Land 76703,2047
To: Michael Lenaghan 72277,3032
This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.
VOID may be an int, but "VOID" is a #define or typedef involving another
intrinsic type. The type "void" was added to C after the original K&R book.
A compiler implements void as an intrinsic type, and a type of void
function(); returns NO value, like a PASCAL function. Lots of folks use VOID
as a compiler independent version of void — if my compiler supports void, my
ctypes file says #define VOID void, otherwise I say #define VOID int. Of
course, if I define VOID as int, I'm not going to be fully portable. If I
use VOID (= int) as a generic pointer, I'll definately run into trouble in
Aztec C unless I redefine VOID long int. -Dave Haynie