positioning-text.rex |
Pipelines v2.1 |
.....|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....10... |
**** Top of file ****
1
2
/* The following pipeline reads the file: winston.txt
and for each input record the
3 pipeline
creates an output record of length 10 bytes, with the text centred and
4 padded left and
right with periods (.). */
5
6 Address Rxpipe
7
8 'pipe < &installdrive:\&installpath\examples\input\winston.txt',
9 '| specs pad . 1-* 1.100 centre', /* 100 byte record, text is centred.. */
10 , /* ..and padded left and right. */
11 '| cons' /* Display on the console. */
12
13 Say 'Hit Enter to close..'
14 Parse Pull
15
16 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 ..............The hallway smelt of boiled cabbage and old rag mats. At one end of it a..............
10 ...........coloured poster, too large for indoor display, has been tacked to the wall. It...........
11 ............depicted simply an enormous face, more than a metre wide: the face of a man.............
12 ...........about forty-five, with a heavy black moustache and ruggedly handsome features............
13 ....................................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 ....................................................................................................
29 Hit Enter to close..
|