3 ms·
> "DO" for "{" and "OD" for "}" so that they could write C++ a bit more like Bash. Bash (like Bourne shell before it) uses do/done. I think DO/OD was in an Al
by dllthomas 4y ago
> "DO" for "{" and "OD" for "}" so that they could write C++ a bit more like Bash.
Bash (like Bourne shell before it) uses do/done. I think DO/OD was in an Algol (68?). I'm not sure where else?
Bash does do the reversing for if/fi and case/esac, though.
- fanf2 4y agoSteve Bourne wanted to use `od` to match Algol 68, but there was already an `od` utility for printing octal dumps. The original bournegol macros for DO and OD were a bit different: #define DO ){ #define OD ;} https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/sh/mac.h https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/sh...