Guest User

Untitled

a guest
Feb 8th, 2024
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1.  
  2. // Case insensitive keywords
  3. Let y be x.
  4. Add 1 to y. // y += 1
  5. Suppose y is_greater_than x, then:
  6. add 1 to x.
  7.  
  8. // Integer.maximum in a Java-like language
  9. // assert x <= Integer.maximum
  10. swear_by_troth x is_less_than_or_equals (maximum of Integer).
  11. otherwise:
  12.  
  13. // try block
  14. prithee:
  15.  
  16. // "(a|an) type from x" = "type(x)" in Python
  17. let x1 be a BigInteger from x.
  18. add 1 to x1.
  19. call printLine with (a String from x1).
  20. let n be result_of call getNumInput.
  21. call printLine with (a String from (x1 divided_by n)).
  22.  
  23. // catch (Exception e)
  24. whereupon_some ZeroDivisionException e:
  25.  
  26. // y of x, not x.y
  27. call print with message of e, length of message of e.
  28.  
  29. whereupon_some IOError e:
  30. call log of IO with message of e, length of message of e.
  31. raise e.
  32.  
  33. // finally
  34. thenceforth:
  35.  
  36. // Equivalent of "delete x1" in C++, except it takes an allocator as an argument
  37. surrender x1 to common_heap.
  38. end of attempt.
  39. end of supposition.
Advertisement
Add Comment
Please, Sign In to add comment