source: tests/io1.cfa @ ac1ae2c

aaron-thesisarm-ehcleanup-dtorsdeferred_resnjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexer
Last change on this file since ac1ae2c was 200fcb3, checked in by Peter A. Buhr <pabuhr@…>, 3 years ago

add auto newline to sout, change endl to nl

  • Property mode set to 100644
File size: 1.4 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 : Tue Dec  4 21:40:28 2018
13// Update Count     : 106
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 | 1 | 2 | 3;
22        sout | '1' | '2' | '3';
23        sout | 1 | "" | 2 | "" | 3;
24        sout;
25
26        sout | "opening delimiters";
27        sout
28                 | "x (" | 1
29                 | "x [" | 2
30                 | "x {" | 3
31                 | "x =" | 4
32                 | "x $" | 5
33                 | "x £" | 6
34                 | "x ¥" | 7
35                 | "x ¡" | 8
36                 | "x ¿" | 9
37                 | "x «" | 10
38                 | nl;
39
40        sout | "closing delimiters";
41        sout
42                 | 1 | ", x"
43                 | 2 | ". x"
44                 | 3 | "; x"
45                 | 4 | "! x"
46                 | 5 | "? x"
47                 | 6 | "% x"
48                 | 7 | "¢ x"
49                 | 8 | "» x"
50                 | 9 | ") x"
51                 | 10 | "] x"
52                 | 11 | "} x"
53                 | nl;
54
55        sout | "opening/closing delimiters";
56        sout
57                 | "x`" | 1 | "`x'" | 2
58                 | "'x\"" | 3 | "\"x:" | 4
59                 | ":x " | 5 | " x\t" | 6
60                 | "\tx\f" | 7 | "\fx\v" | 8
61                 | "\vx\n" | 9 | "\nx\r" | 10
62                 | "\rx"
63                 | nl;
64
65        sout | "override opening/closing delimiters";
66        sout | "x ( " | 1 | " ) x" | 2 | " , x" | 3 | " :x: " | 4;
67        sout;
68}
69
70// Local Variables: //
71// tab-width: 4 //
72// compile-command: "cfa io1.cfa" //
73// End: //
Note: See TracBrowser for help on using the repository browser.