needs tests/harness comp/c testbegin :c enum { FOUR=4, FIVE, }; \test binop precedence :c uint exprbinops() { uint a=1, b=2; return a + b * FIVE + NULL; } exprbinops 11 #eq \test let's try function prototyping support :c int myadder(int a, int b); \ are arguments, both constants and lvalues, properly passed? \ do we support expressions as arguments? :c int plusone(int x) { return myadder(1, x+x-x); } \ implements the above prototype :c int myadder(int a, int b) { return a + b; } 42 plusone 43 #eq \test condif :c int condif(int x) { if (x < 42) { x = x+100; } else { x = x+1; } return x; } 54 condif 55 #eq 42 condif 43 #eq 41 condif 141 #eq \test that a void function doesn't add anything to PS :c void cnoop() {} cnoop ( no result! ) scntneutral# \test helloworld :c uchar *msgs[1] = {"Hello World!"}; :c void helloworld() { stype(msgs[0]); } ' helloworld capture "Hello World!" #[]s= \test nullstr :c char* nullstr() { return "Null terminated"0; } create expected ,"Null terminated\0" nullstr expected 16 c[]= # \test forsum :c int forsum(int n) { int i; int r = 0; for (i=0; i