codingOL

Console Output for Prelim Test

Aug 6th, 2012
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. Type Filename of INPUT FILE (ends with .pc)
  2. Filename (Example: test.pc): test.pc
  3. --- result of parsed code ---
  4. MATH EXPRESSIONS
  5. ----------------
  6. 3 raised to 3 (Function): 81.0
  7. RECURSIVE FUNCTION - The factorial of 5.0 is: 120.0
  8. ARRAY TEST - array consists of 3 elements
  9. element 1: 7.0
  10. element 2: 8.0
  11. element 3: 9.0
  12. element 1 + 2 = 15.0
  13. element 2 * 3 = 72.0
  14. WHILE CONSTRUCT: AS LONG AS (<expr>) DO BEGIN <code> END
  15. 50.0
  16. DO-WHILE LOOP CONSTRUCT: PERFORM BEGIN <code> END AS LONG AS (<expr>)
  17. 4.0
  18. 7.0
  19. 10.0
  20. 13.0
  21. 16.0
  22. 19.0
  23. 22.0
  24. 25.0
  25. 28.0
  26. 31.0
  27. 34.0
  28. 37.0
  29. 40.0
  30. 43.0
  31. 46.0
  32. 49.0
  33. 52.0
  34. 55.0
  35. 58.0
  36. 61.0
  37. 64.0
  38. 67.0
  39. 70.0
  40. 73.0
  41. 76.0
  42. FOR LOOP CONSTRUCT: WHERE <counter start> UNTIL <number of iterations> DO BEGIN <code> END
  43. 1.0
  44. 2.0
  45. 3.0
  46. 4.0
  47. 5.0
  48. 6.0
  49. 7.0
  50. 8.0
  51. 9.0
  52. 10.0
  53. 11.0
  54. 12.0
  55. 13.0
  56. 14.0
  57. 15.0
  58. END OF PROGRAM
Advertisement
Add Comment
Please, Sign In to add comment