diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-06 11:05:40 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-06 11:05:40 -0400 |
| commit | b4365e3d457d7f5179fed57c9f828bbce4994476 (patch) | |
| tree | 1e697e03dcbd2bbbcd925b4292f15c551a5d5e75 /src | |
| parent | 4fa91c4a662c8cb1f1efe631610b944381e12457 (diff) | |
Clean up control picture substitution a little
Diffstat (limited to 'src')
| -rw-r--r-- | src/fmt.bqn | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/fmt.bqn b/src/fmt.bqn index 18969fb9..9344042d 100644 --- a/src/fmt.bqn +++ b/src/fmt.bqn @@ -1,11 +1,6 @@ # Format an array to a character matrix { F0βπ½ # Function to format a scalar - # Substitute control codes for character arrays - CSub β { - del β @+127 - π© + (('β‘'-del)Γπ©=del) + ('β'-@)Γπ©<@+32 - } # Vertical padding for arrays of rank greater than 2 PadV β { # Leading shape @@ -52,6 +47,9 @@ # All characters k β ββ(0βΈ=) -β c β Β―1ββ’π© q β '"' + # Escape quotes in strings (rank 1) and substitute control chars + # with control pictures for other ranks. + CSub β { π© + (π©(=Γ'β‘'-β’)@+127) + ('β'-@)Γπ©<@+32 } π© β© (1β =)βΆβ¨(1+q=β’)βΈ/,Csubβ© π© (r Enframe 1 PadH PadV)β(1β r) β (cβq) βΎβk π© βΎβk β½βΎβ₯cβq }βΏ{ |
