PROG2.LST 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. Listing:
  2. 1 MODULE prog2;
  3. 2 (* This program writes out some Pythagorean triples *)
  4. 3 FROM IO IMPORT WrStr, WrLngCard, WrLn;
  5. 4 VAR a,b,c:LONGCARD;
  6. ***** ^ undeclared identifier
  7. 5 BEGIN
  8. 6 FOR c := 1 TO 100 DO
  9. ***** ^ FOR needs integer variable and bounds
  10. 7 FOR b := 1 TO c DO
  11. ***** ^ FOR needs integer variable and bounds
  12. ***** ^ not supported yet
  13. 8 FOR a := 1 TO b DO
  14. ***** ^ FOR needs integer variable and bounds
  15. ***** ^ not supported yet
  16. 9 IF a*a + b*b = c*c THEN
  17. ***** ^ not supported yet
  18. ***** ^ not supported yet
  19. ***** ^ not supported yet
  20. ***** ^ not supported yet
  21. ***** ^ not supported yet
  22. ***** ^ not supported yet
  23. 10 WrLngCard(a,1);
  24. ***** ^ not supported yet
  25. ***** ^ not supported yet
  26. ***** ^ not supported yet
  27. 11 WrStr(', ');
  28. ***** ^ not supported yet
  29. ***** ^ not supported yet
  30. 12 WrLngCard(b,1);
  31. ***** ^ not supported yet
  32. ***** ^ not supported yet
  33. ***** ^ not supported yet
  34. 13 WrStr(', ');
  35. ***** ^ not supported yet
  36. ***** ^ not supported yet
  37. 14 WrLngCard(c,1);
  38. ***** ^ not supported yet
  39. ***** ^ not supported yet
  40. ***** ^ not supported yet
  41. 15 WrLn;
  42. ***** ^ not supported yet
  43. 16 END;
  44. 17 END;
  45. 18 END;
  46. 19 END;
  47. 20 END prog2.
  48. 26 errors