source: doc/theses/mike_brooks_MMath/programs/bkgd-c-tyerr.c @ 282061a

Last change on this file since 282061a was 266732e, checked in by Peter A. Buhr <pabuhr@…>, 7 months ago

switch to tabs, first attempt changing program-input style

  • Property mode set to 100644
File size: 503 bytes
Line 
1#include <stdio.h>
2#include <assert.h>
3#include <stdlib.h>
4
5#ifdef ERRS
6#define ERR(...) __VA_ARGS__
7#else
8#define ERR(...)
9#endif
10
11int main() {
12        float * x;                      $\C{// x points at a floating-point number}$
13        void (*y)(void);        $\C{// y points at a function}$
14        @x = y;@                        $\C{// wrong}$
15        @y = x;@                        $\C{// wrong}$
16
17        float pi = 3.14;
18        void f( void (*g)(void) ) { g(); }
19        @f( &pi );@                     $\C{// wrong}$
20}
21
22// Local Variables: //
23// compile-command: "sed -f sedcmd bkgd-c-tyerr.c > tmp.c; gcc tmp.c" //
24// End: //
Note: See TracBrowser for help on using the repository browser.