sorting-a-paragraph.rex |
Pipelines v2.1 |
.....|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....10... |
**** Top of file ****
1
2 /* The following pipeline reads the input file: winston.txt, and calls the target
3 pipeline: sort-paragraph.rex to sort the second paragraph in ascending record order. */
4
5 Address Rxpipe
6
7 'pipe (endchar ?)',
8 '< &installdrive:\&installpath\examples\input\winston.txt',
9 '| callpipe "&installdrive:\&installpath\examples\subroutine\sort-paragraph.rex" 2 a',
10 '| cons' /* Display on the console. */
11
12 Say 'Hit Enter to close..'
13 Parse Pull
14
15 Exit 0
**** End of file ****
Console
output |
.....|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....10...
1
2
3
4 It was a bright cold day in April, and the clocks were striking thirteen.
5 Winston Smith, his chin nuzzled into his breast in an effort to escape the vile
6 wind, slipped quickly through the glass doors of Victory Mansions, though not
7 quickly enough to prevent a swirl of gritty dust from entering along with him.
8
9 1 about forty-five, with a heavy black moustache and ruggedly handsome features.
10 2 coloured poster, too large for indoor display, has been tacked to the wall. It
11 3 depicted simply an enormous face, more than a metre wide: the face of a man
12 4 The hallway smelt of boiled cabbage and old rag mats. At one end of it a
13 5 Winston made for the stairs.
14
15 It was no use trying the lift. Even at the best of times it was seldom working,
16 and at present the electric current was cut off during daylight hours. It was
17 part of the economy drive in preparation for Hate Week. The flat was seven
18 flights up, and Winston, who was thirty-nine and had a varicose ulcer above his
19 right ankle, went slowly, resting several times on the way. On each landing,
20 opposite the lift shaft, the poster with the enormous face gazed from the wall.
21 It was one of those pictures which are so contrived that the eyes follow you
22 about when you move.
23
24 BIG BROTHER IS WATCHING YOU, the caption beneath it ran.
25
26
27
28 Hit Enter to close..
|