Path: utzoo!mnetor!uunet!husc6!think!ames!pasteur!ucbvax!ADEA-ATT.ARPA!tnt From: tnt@ADEA-ATT.ARPA (Tom Teng) Newsgroups: comp.windows.x Subject: Boolean Type for X Toolkit Message-ID: <8803260340.AA02465@ai-att> Date: 26 Mar 88 03:40:31 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 30 In the X Toolkit "Intrinsic.h" header file, the following types and constants are defined: #define FALSE 0 #define TRUE 1 typedef char Boolean; Suppose someone defined a Boolean function as: Boolean resourceClass(className) String className; { if (uppercase(*className)) return(FALSE); else return(TRUE): } and used it in the following conditional: if (resourceClass("confirmer") == TRUE) .... because resourceClass is a boolean (i.e. char type), the above conditional will never be true (comparing some control character to 1). Shouldn't Booleanbe typedef as an int type. (Am I being really stupid or what???) also, when I am using dbx, why is String defined as caddr_t? tnt