home *** CD-ROM | disk | FTP | other *** search
/ cs.rhul.ac.uk / www.cs.rhul.ac.uk.zip / www.cs.rhul.ac.uk / pub / rdp / rdp_cs3460.tar / testcalc.m < prev    next >
Text File  |  1998-05-07  |  571b  |  24 lines

  1. (*******************************************************************************
  2. *
  3. * RDP release 1.50 by Adrian Johnstone (A.Johnstone@rhbnc.ac.uk) 20 December 1997
  4. *
  5. * testcalc.m - a piece of Mini source to test the Minicalc interpreter
  6. *
  7. * This file may be freely distributed. Please mail improvements to the author.
  8. *
  9. *******************************************************************************)
  10.  
  11. int a=3+4, b=1;
  12.  
  13. print("a is ", a, "\n");
  14.  
  15. b=a*2;
  16.  
  17. print("b is ", b, ", -b is ", -b, "\n");
  18.  
  19. int z = a ** 3;
  20. print(a, " cubed is ", z, "\n");
  21.  
  22. (* End of testcalc.m *)
  23.  
  24.