Script:
~addons/finance/finexec/toolbox/boxed_table.ijs
Contributor: William Szuch
Updated: 2022 6 26
Depend: nil
Definitions: loaded to locale base
Status: done
Script source:
boxed_table.ijs
Build a boxed table of data for numbers or
characters that can be
used as input to a definition.
Definitions
boxedtable (monad)
Form: tacit
Build a boxed table from lists of pairs of numbers or chatacters.
Syntax
boxedtable(L1;L2)
L1 = list of numbers or characters
L2 = list of numbers or characters
L1 and L2 to be of the same different type: numbers and or characters
Example
boxedtable(1 2;3 4 5)
┌─────┬─────┬─────┐
│┌─┬─┐│┌─┬─┐│┌─┬─┐│
││1│3│││1│4│││1│5││
│└─┴─┘│└─┴─┘│└─┴─┘│
├─────┼─────┼─────┤
│┌─┬─┐│┌─┬─┐│┌─┬─┐│
││2│3│││2│4│││2│5││
│└─┴─┘│└─┴─┘│└─┴─┘│
└─────┴─────┴─────┘
boxedtable('ab';'cde')
┌─────┬─────┬─────┐
│┌─┬─┐│┌─┬─┐│┌─┬─┐│
││a│c│││a│d│││a│e││
│└─┴─┘│└─┴─┘│└─┴─┘│
├─────┼─────┼─────┤
│┌─┬─┐│┌─┬─┐│┌─┬─┐│
││b│c│││b│d│││b│e││
│└─┴─┘│└─┴─┘│└─┴─┘│
└─────┴─────┴─────┘
boxedtable( 'ab';4 5 6)
┌─────┬─────┬─────┐
│┌─┬─┐│┌─┬─┐│┌─┬─┐│
││a│4│││a│5│││a│6││
│└─┴─┘│└─┴─┘│└─┴─┘│
├─────┼─────┼─────┤
│┌─┬─┐│┌─┬─┐│┌─┬─┐│
││b│4│││b│5│││b│6││
│└─┴─┘│└─┴─┘│└─┴─┘│
└─────┴─────┴─────┘