BCPL isn't as primitive as I expected. It's surprisingly similar to C, except lacking types. C's structs, unions, bitfields are almost a direct copy of BCPL, along with the ternary ? operator. C's lvalues, rvalues, and pointers are also just like BCPL.
BCPL has way more control flow statements than C: if EXP do STATEMENT, unless EXP do S, test EXP then S1 or STAT2, test EXP ifso S1 ifnot S2, while EXP do S, until E do S, S repeatwhile EXP, S repeatuntil EXP, S repeat, switchon EXP into CASES, etc. The C language trimmed out a lot of the redundancy. BCPL's switchon statement is just like C's with fall-through cases unless you use a break.
BCPL isn't as primitive as I expected. It's surprisingly similar to C, except lacking types. C's structs, unions, bitfields are almost a direct copy of BCPL, along with the ternary ? operator. C's lvalues, rvalues, and pointers are also just like BCPL.
BCPL has way more control flow statements than C: if EXP do STATEMENT, unless EXP do S, test EXP then S1 or STAT2, test EXP ifso S1 ifnot S2, while EXP do S, until E do S, S repeatwhile EXP, S repeatuntil EXP, S repeat, switchon EXP into CASES, etc. The C language trimmed out a lot of the redundancy. BCPL's switchon statement is just like C's with fall-through cases unless you use a break.