source: tests/io1.cfa @ d2de1be9

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since d2de1be9 was 17a1b21, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

add printing and testing for zero_t and one_t

  • Property mode set to 100644
File size: 1.6 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// io1.cfa --
8//
9// Author           : Peter A. Buhr
10// Created On       : Wed Mar  2 16:56:02 2016
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Mon Mar  4 21:42:47 2019
13// Update Count     : 115
14//
15
16#include <fstream.hfa>
17
18int main() {
19        int x = 3, y = 5, z = 7;
20        sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2);
21        sout | 0 | 1 | 2 | 3;
22        sout | '0' | '1' | '2' | '3';
23        sout | 0 | "" | 1 | "" | 2 | "" | 3;
24        sout | nl;
25
26        sout | nlOff;
27        sout | "opening delimiters" | nl;
28        sout | "x (" | 1;
29        sout | "x [" | 2;
30        sout | "x {" | 3;
31        sout | "x =" | 4;
32        sout | "x $" | 5;
33        sout | "x £" | 6;
34        sout | "x ¥" | 7;
35        sout | "x ¡" | 8;
36        sout | "x ¿" | 9;
37        sout | "x «" | 10;
38        sout | nl | nl;
39
40        sout | "closing delimiters" | nl;
41        sout | 1 | ", x";
42        sout | 2 | ". x";
43        sout | 3 | "; x";
44        sout | 4 | "! x";
45        sout | 5 | "? x";
46        sout | 6 | "% x";
47        sout | 7 | "¢ x";
48        sout | 8 | "» x";
49        sout | 9 | ") x";
50        sout | 10 | "] x";
51        sout | 11 | "} x";
52        sout | nl | nl;
53
54        sout | "opening/closing delimiters" | nl;
55        sout | "x`" | 1 | "`x'" | 2;
56        sout | "'x\"" | 3 | "\"x:" | 4;
57        sout | ":x " | 5 | " x\t" | 6;
58        sout | "\tx\f" | 7 | "\fx\v" | 8;
59        sout | "\vx\n" | 9 | "\nx\r" | 10;
60        sout | "\rx";
61        sout | nl | nl;
62
63        sout | nlOn;
64        sout | "override opening/closing delimiters";
65        sout | "x ( " | 1 | " ) x" | 2 | " , x" | 3 | " :x: " | 4;
66        sout | nl;
67}
68
69// Local Variables: //
70// tab-width: 4 //
71// compile-command: "cfa io1.cfa" //
72// End: //
Note: See TracBrowser for help on using the repository browser.