Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. package metaobjectTest
  2.  
  3.  
  4. @doc{*
  5. Macro 'assert' has the following syntax:
  6. assert expr;
  7. 'assert' is a macro keyword and 'expr' a Cyan expression. A ';'
  8. should end the macro call.
  9. At runtime, if 'expr' is false, an error message is issued.
  10. The program is NOT terminated.
  11.  
  12. *}
  13. object Assert
  14.  
  15. func run {
  16. assert "This message should be printed" == "";
  17. assert "Do not print this" size > 10;
  18. assert 0 == 0;
  19. assert " "*3 == " ";
  20. }
  21.  
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement