Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 exptools; site whuxl.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!whuxl!mike From: mike@whuxl.UUCP (BALDWIN) Newsgroups: net.lang.c Subject: Re: CTRL(X) in ANSI standard Message-ID: <621@whuxl.UUCP> Date: Sun, 5-May-85 13:15:36 EDT Article-I.D.: whuxl.621 Posted: Sun May 5 13:15:36 1985 Date-Received: Mon, 6-May-85 02:05:45 EDT References: <10425@brl-tgr.ARPA> Organization: AT&T Bell Laboratories, Whippany Lines: 17 > #define CTRL(XX) ( ($XX)[0] & '\037') > replaces > #define CTRL(XX) ('XX' & '\037') A more reasonable definition without any weirdness would be #define CTRL(c) ((c) & '\037') So you use CTRL('g') instead of CTRL(g). This way it looks more like a real function call (rather than passing some nonexistent variable g). Here's a silly though: since '\xFC' has been added to ANSI C for hex characters, how about '\^G' for control characters, ala ICON? I never did like the CTRL macro. Michael Baldwin AT&T Bell Labs harpo!whuxl!mike