BLOCK-PRINT

Prints a character string in a block format.

Command Class

TCL-II command

Syntax

BLOCK-PRINT char-string {char-string} {(option}

char-stringis a string of printable characters. char-string must be no longer than the current line length set by the last TERM command. A line length usually consists of 80 or 132 columns.

char-string must be enclosed in double quotes (") if it contains single quotes, and vice versa. It must also be contained in quotes if embedded blanks are to be preserved. The surrounding quotes are not printed.

Option

M Uses Q-pointer MINI-CONVERT data section, if created. See the description of the BLOCK-CONVERT file.

Processing

The BLOCK-CONVERT file, described below, is used to create characters. If you wish to change the way any character is printed, you must change the corresponding item in the BLOCK-CONVERT file.

Multiple character-strings separated by blanks are output on separate lines.

Example

:BLOCK-PRINT AB1

The output to the printer is as follows:

    AAAA       BBBBBBBBBBB        1111
AAAAAA BBBBBBBBBBBB 11111
AAAAAAAA BBBB BBBB 111111
AAAA AAAA BBBBBBBBBBBB 1111111
AAAA AAAA BBBBBBBBBBB 1111
AAAAAAAAAAAA BBBB BBBB 1111
AAAAAAAAAAAA BBBB BBBB 1111
AAAA AAAA BBBBBBBBBBBB 111111111111
AAAA AAAA BBBBBBBBBBB 111111111111

BLOCK-CONVERT File

The BLOCK-CONVERT file which resides in SYSFILES contains items defining the conversion specifications for all printable ASCII characters, except lower-case alphabetic characters; one item per character.

Data Sections

The BLOCK-CONVERT file has three data sections:

Creating Your Own Block-Convert File

Since the BLOCK-CONVERT item is a Q-pointer, you can create your own file of characters for display, but you must observe the following rules:

  1. Do not create a file named BLOCK-PRINT. Use a unique file-name and edit the BLOCK-CONVERT item to point to it.
  2. The item-id of each item in your file is the character to be converted.
  3. Each item in the data section must have the same number of attributes.

Item Format

The format of an item is as follows:

item-id The character to be converted.

Attr. 1 Specifies (in decimal) the number of horizontal bytes (columns) in the blocked character to be output.

Attr. 2 onwards Contain conversion specifications. Each attribute contains one or more values, separated by value marks (CTRL+], X'FD').

The first character of the first value in each attribute must be one of the following:

C Character. Output matrix line begins with a character.

B Blank. Output matrix line begins with a blank.

A decimal number must follow immediately after, indicating the number of characters or blanks.

The presence of a value mark indicates a switch from character to blank status, or vice versa, and must be followed by the number of bytes to be output.

Be sure to specify trailing blanks so that the print block character takes up the space specified in attribute one.

Example of BLOCK-CONVERT Item

The following is item X in data section BLOCK-CONVERT.

X              Item-id
001 12         Blocked character is 12 bytes wide.
002 C4]4]4     Output 4 characters, 4 blanks, 4 characters.
003 B1]4]2]4]1 Output 1 blank, 4 characters, 2 blanks, 4 characters, 1 blank.
004 B2]8]2     Output 2 blanks, 8 characters, 2 blanks.
005 B3]6]3     Output 3 blanks, 6 characters, 3 blanks.
006 B4]4]4     Output 4 blanks, 4 characters, 4 blanks.
007 B3]6]3     Output 3 blanks, 6 characters, 3 blanks.
008 B2]8]2     Output 2 blanks, 8 characters, 2 blanks.
009 B1]4]2]4]1 Output 1 blank, 4 characters, 2 blanks, 4 characters, 1 blank.
010 C4]4]4     Output 4 characters, 4 blanks, 4 characters.

This prints the block character:

XXXX    XXXX
XXXX XXXX
XXXXXXXX
XXXXXX
XXXX
XXXXXX
XXXXXXXX
XXXX XXXX
XXXX XXXX

Example of SMALL-CONVERT Item

The following is item X in the SMALL-CONVERT data section.

X              Item-id
001 7          Blocked character is 7 bytes wide.
002 C1]5]1     Output 1 characters, 5 blanks, 1 characters.
003 B1]1]3]1]1 Output 1 blank, 1 character, 3 blanks, 1 character, 1 blank.
004 B2]1]1]1]2 Output 2 blanks, 1 character, 1 blank, 1 character, 2 blanks.
005 B3]1]3     Output 3 blanks, 1 character, 3 blanks.
006 B2]1]1]1]2 Output 2 blanks, 1 character, 1 blank, 1 character, 2 blanks.
007 B1]1]3]1]1 Output 1 blank, 1 character, 3 blanks, 1 character, 1 blank.
008 C1]5]1     Output 1 blank, 5 characters, 1 blank.
009 C1]5]1     Output 1 blank, 5 characters, 1 blank.
010 B7         Output 7 blanks.
011 B7         Output 7 blanks.
012 B7         Output 7 blanks.

When printed the character looks like the following:

X     X
X X
X X
X
X X
X X
X X

Example of MINI-CONVERT Item

The following is item X in the MINI-CONVERT data section.

x              Item-id
001 6          Blocked character is 6 bytes wide.
002 C2]2]2     Output 2 characters, 2 blanks, 2 characters.
003 B1]1]2]1]1 Output 1 blank, 1 character, 2 blanks, 1 character, 1 blank.
004 B2]2]2     Output 2 blanks, 2 characters, 2 blanks.
005 B1]1]2]1]1 Output 1 blank, 1 character, 2 blanks, 1 character, 1 blank.
006 C2]2]2     Output 2 blanks, 2 characters, 2 blanks.

When printed the character looks like the following:

XX  XX
X X
XX
X X
XX XX