Indentation (NOT braces)

utzoo!decvax!ittvax!sii!mem utzoo!decvax!ittvax!sii!mem
Tue Nov 9 21:45:06 AEST 1982


c
8 characters per stab top was used, presumably, because it is the closest
binary power to a useful separation between assembler fields.  Binary
powers, natch, because tab stop computation is simpled by add/shift/or.

I like 3 chars per c-stob myself.  It's nice to befuddle binary
machines with ternary usage, if nothing else.

And speaking of ternary logic-- wouldn't it be really nice to have
such an animal in a compiler.  There is often a necessity for
three-state logic, each state being:
   - Not applicable
   - False
   - True

The 3-state nature of flags is ALREADY built into all hardware designs
(combinations of Z and M).  A typical situation?  A temporary flag
used to override a global flag, where normal interpretation requires:
   if (temporary-flag-is-significant)
      if (temporary-flag-value) then action;
      else alternate-action;
   else /* temporary-flag is not-significant */
     if (global-flag-value) then action;
     else alternate-action;


where ternary logic simply would combine the product of the temporary
  (three-state) flag with the global (two-state) flag.


Yours in generality,
Mark Mallett



More information about the Comp.lang.c mailing list