home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / programm / programi / saslib.lzh / demotest.c < prev    next >
C/C++ Source or Header  |  1991-12-20  |  463b  |  26 lines

  1. #include <proto/exec.h>
  2. #include "demo_pragmas.h"
  3. #include <stdlib.h>
  4. #include <math.h>
  5.  
  6. /*
  7.  *  This would normally be in a proto file
  8.  */
  9. int SquareMe(int);
  10.  
  11. struct Library *DemoBase;
  12.  
  13. void main(int argc, char *argv[])
  14. {
  15.  
  16.     DemoBase = OpenLibrary("demo.library", 0);
  17.     if (!DemoBase) {
  18.         printf("Where's demo.library?\n");
  19.         exit(0);
  20.     }
  21.     printf("Base is %08X\n", DemoBase);
  22.     printf("Square of input is: %d\n", SquareMe(atoi(argv[1])));
  23.     CloseLibrary(DemoBase);
  24. }
  25.  
  26.