Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!bentley!kwh From: kwh@bentley.UUCP (KW Heuer) Newsgroups: net.lang,net.lang.c Subject: Indentation instead of braces Message-ID: <845@bentley.UUCP> Date: Thu, 22-May-86 16:26:21 EDT Article-I.D.: bentley.845 Posted: Thu May 22 16:26:21 1986 Date-Received: Sun, 25-May-86 13:02:03 EDT References: <2783@utcsri.UUCP> Followup-To: net.lang Organization: AT&T Bell Laboratories, Liberty Corner Lines: 27 Xref: watmath net.lang:2450 net.lang.c:9133 In article <2783@utcsri.UUCP> utcsri!greg writes: >What about the following sort of thing, though ? ( this is >how I would write it in normal C ): > ... if( vogsphere == fuddle && !blasted ){ > while( sixteenvalvedualoverheadcam( bleen ) == '?') > infriddle( batman.utility_belt ); > if( total_confusion_estimated > MAX_CONFUSION ) > printf( >"Well I think you ought to know that I am getting really confused by %s\n", > reason_for_confusion[WOMBAT] > ); > return SAY_WHAT; > }else post_to_net_lang_c( silly_stuff_like_this ); No problem. Remove the braces, leave the indentation alone, and tack a backslash onto the first three lines of the printf statement. Earlier I wondered aloud about the proper interpretation of "if (c) x; y;" (without newlines). It seems to me that both x and y would be within the scope of the conditional (ditto for "\tif(c) x;\n\t\ty;\n"). Is this how it's done in existing languages with significant indentation (OCCAM)? Or is that syntax illegal, requiring a newline (my guess)? This feature is not likely to be incorporated into C in the foreseeable future, So I am directing followups to net.lang only. Karl W. Z. Heuer (ihnp4!bentley!kwh), The Walking Lint