Building a matrix

Pipelines v1.6

 

.* Example by TenFiftyTwo(c).

Home

 
.* The following pipeline reads the file: example.txt; and builds a set of matrices. Each
.* matrix is 4 columns wide by 5 rows deep. The pipeline demonstrates the SNAKE stage
.* which builds multicolumn, aligned output records.
 
pipe < &installdrive:\&installpath\examples\input\example.txt  .* Read input file.
     | split                             .* Split the records into individual words.
     | specs recno strip 1.3 1-* nw      .* Insert the record number.
     | snake 4 align / / 5 //            .* Build a set of matrices; each 4 columns wide..
                                         .* ..by 5 rows deep.
     | cons                              .* Display on the console.