source: git/Tst/Manual/int_operations.tst

spielwiese
Last change on this file was 894057, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
  • Property mode set to 100644
File size: 278 bytes
Line 
1LIB "tst.lib"; tst_init();
2  int i=1;
3  int j;
4  i++; i;  i--; i;
5  // ++ and -- do not return a value as in C, cannot assign
6  j = i++;
7  // the value of j is unchanged
8  j; i;
9  i+2, 2-i, 5^2;
10  5 div 2, 8%3;
11  -5 div 2, -5 / 2, -5 mod 2, -5 % 2;
12  1<2, 2<=2;
13tst_status(1);$
Note: See TracBrowser for help on using the repository browser.