source: tests/io/io1.cfa @ fcd65ca

ADTast-experimentalenumforall-pointer-decaypthread-emulationqualifiedEnum
Last change on this file since fcd65ca was 6083392, checked in by Peter A. Buhr <pabuhr@…>, 4 years ago

restructure tests under directories and update test files

  • Property mode set to 100644
File size: 1.7 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 : Sun Feb 21 10:07:07 2021
13// Update Count     : 119
14//
15
16#include <fstream.hfa>
17
18int main() {
19        sout | nlOff;                                                                           // auto nl off
20
21        sout | "opening delimiters" | nl;
22        sout | "x (" | 1;
23        sout | "x [" | 2;
24        sout | "x {" | 3;
25        sout | "x =" | 4;
26        sout | "x $" | 5;
27        sout | "x £" | 6;
28        sout | "x ¥" | 7;
29        sout | "x ¡" | 8;
30        sout | "x ¿" | 9;
31        sout | "x «" | 10;
32        sout | nl | nl;
33
34        sout | "closing delimiters" | nl;
35        sout | 1 | ", x";
36        sout | 2 | ". x";
37        sout | 3 | "; x";
38        sout | 4 | "! x";
39        sout | 5 | "? x";
40        sout | 6 | "% x";
41        sout | 7 | "¢ x";
42        sout | 8 | "» x";
43        sout | 9 | ") x";
44        sout | 10 | "] x";
45        sout | 11 | "} x";
46        sout | nl | nl;
47
48        sout | "opening/closing delimiters" | nl;
49        sout | "x`" | 1 | "`x'" | 2;
50        sout | "'x\"" | 3 | "\"x:" | 4;
51        sout | ":x " | 5 | " x\t" | 6;
52        sout | "\tx\f" | 7 | "\fx\v" | 8;
53        sout | "\vx\n" | 9 | "\nx\r" | 10;
54        sout | "\rx";
55        sout | nl | nl;
56
57        sout | nlOn;                                                                            // auto nl on
58
59        sout | "override opening/closing delimiters";
60        sout | "x ( " | 1 | " ) x" | 2 | " , x" | 3 | " :x: " | 4;
61        sout | nl;
62
63        sout | "spacing";
64        sout | 0 | 1 | 2 | 3;
65        sout | '0' | '1' | '2' | '3';
66        sout | 0 | "" | 1 | "" | 2 | "" | 3;
67        sout | nl;
68
69        sout | "expressions";
70        int x = 3, y = 5, z = 7;
71        sout | x * 3 | y + 1 | z << 2 | x == y | (x | y) | (x || y) | (x > z ? 1 : 2);
72}
73
74// Local Variables: //
75// tab-width: 4 //
76// compile-command: "cfa io1.cfa" //
77// End: //
Note: See TracBrowser for help on using the repository browser.