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_cs3470.tar / testcond.m < prev    next >
Text File  |  1998-05-07  |  729b  |  30 lines

  1. (*******************************************************************************
  2. *
  3. * RDP release 1.50 by Adrian Johnstone (A.Johnstone@rhbnc.ac.uk) 20 December 1997
  4. *
  5. * testcond.m - a piece of Minicond source to test the Minicond 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. print(a, " cubed is ", a**3, "\n");
  20.  
  21. int z = a;
  22.  
  23. if z==a then print ("z equals a\n") else print("z does not equal a\n");
  24.  
  25. z=a - 3;
  26.  
  27. if z==a then print ("z equals a\n") else print("z does not equal a\n");
  28.  
  29. (* End of testcond.m *)
  30.