$T.REX: Difference between revisions
Content added Content deleted
(added whitespace, used better indentations, changed comments, add more idiomatic code, other cosmetic changes.) |
m (→$T.REX: added/changed comments and whitespace, added more indentations.) |
||
Line 1: | Line 1: | ||
==$T.REX== |
==$T.REX== |
||
This is the '''$T.REX''' (REXX) program which is used by other REXX programs to display error or informational message(s), |
This is the '''$T.REX''' (REXX) program which is used by many other REXX programs to display error or informational message(s), |
||
<br>some of the options |
<br>some of the options are: |
||
* in color(s) (if supported) |
:* in color(s) (if supported) |
||
* highlights (in color) parts (up to 8 unique parts) of the text (if supported) |
:* highlights (in color) parts (up to 8 unique parts) of the text (if supported) |
||
* write text to a file |
:* write text to a file |
||
* breaks the text into multiple lines |
:* breaks the text into multiple lines |
||
* adds indentation |
:* adds indentation |
||
* justifies the text: left/right/center/justify ( |
:* justifies the text: left/right/center/justify (auto-fill) |
||
* add blank lines before and/or after the displaying of text |
:* add blank lines before and/or after the displaying of text |
||
* boxing (around) the text |
:* boxing (around) the text |
||
* add spacing around the text inside the box |
:* add spacing around the text inside the box |
||
* only showing specific lines of the text messages |
:* only showing specific lines of the text messages |
||
* suppressing specific lines of the text messages |
:* suppressing specific lines of the text messages |
||
* translation of certain characters in the text |
:* translation of certain characters in the text |
||
* allowing other characters to be used for blanks |
:* allowing other characters to be used for blanks |
||
* repeating a text |
:* repeating a text |
||
* allows remarks in the text |
:* allows remarks in the text |
||
* writes the message, waits for a confirmation to proceed |
:* writes the message, waits for a confirmation to proceed |
||
* delaying (waiting) after the text is displayed |
:* delaying (waiting) after the text is displayed |
||
* showing a scale and/or a ruler above/below the text message(s) |
:* showing a scale and/or a ruler above/below the text message(s) |
||
* supports hex/dec/bit strings |
:* supports hex/dec/bit strings |
||
* changing the case of the text |
:* changing the case of the text |
||
* reverses the text |
:* reverses the text |
||
* inverts the bits for certain characters |
:* inverts the bits for certain characters |
||
* sounds alarm (beeps) after the text is displayed (if supported) |
:* sounds alarm (beeps) after the text is displayed (if supported) |
||
* displays the text in reverse video (if supported) |
:* displays the text in reverse video (if supported) |
||
* displays the text in (big) block letters |
:* displays the text in (big) block letters |
||
* clear the screen after or before the displaying of text |
:* clear the screen after or before the displaying of text |
||
* allows user-define option character, the default is '''.''' (period) |
:* allows user-define option character, the default is '''.''' (period) |
||
* and many other options |
:* and many other options |
||
⚫ | |||
⚫ | |||
<br><br>The '''$T''' REXX program makes use of '''$ERR''' REXX program which is used to display error messages (via '''$T'''). |
<br><br>The '''$T''' REXX program makes use of '''$ERR''' REXX program which is used to display error messages (via '''$T'''). |
||
<br>The '''$ERR''' REXX program is included here ──► [[$ERR.REX]]. |
<br>The '''$ERR''' REXX program is included here ──► [[$ERR.REX]]. |
||
<br><br>The '''$T''' REXX program makes use of '''LINESIZE''' BIF which returns the terminals width (linesize). |
<br><br>The '''$T''' REXX program makes use of '''LINESIZE''' BIF which returns the terminals width (linesize). |
||
<br>Some REXXes |
<br>Some REXXes don't have a '''LINESIZE''' BIF, so one is included here ──► [[LINESIZE.HEL]]. |
||
<br><br>The '''$T''' REXX program makes use of '''SCRSIZE''' BIF which returns the terminals width (linesize) and depth. |
<br><br>The '''$T''' REXX program makes use of '''SCRSIZE''' BIF which returns the terminals width (linesize) and depth. |
||
<br>Some REXXes |
<br>Some REXXes don't have a '''SCRSIZE''' BIF, so one is included here ──► [[SCRSIZE.HEL]]. |
||
<br><br>The '''$T''' REXX program makes use of '''DELAY''' BIF which delays (sleeps) for a specified amount of seconds. |
<br><br>The '''$T''' REXX program makes use of '''DELAY''' BIF which delays (sleeps) for a specified amount of seconds. |
||
<br>Some REXXes |
<br>Some REXXes don't have a '''DELAY''' BIF, so one is included here ──► [[DELAY.REX]]. |
||
<br><br>The '''$T''' REXX program makes use of '''SOUND''' BIF which produces sounds via the PC speaker. |
<br><br>The '''$T''' REXX program makes use of '''SOUND''' BIF which produces sounds via the PC speaker. |
||
<br>Some REXXes |
<br>Some REXXes don't have a '''SOUND''' BIF, so one is included here ──► [[SOUND.REX]]. |
||
<br><br>REXX programs not included are '''$H''' which shows '''help''' and other documentation. |
<br><br>REXX programs not included are '''$H''' which shows '''help''' and other documentation. |
||
<lang rexx>/*REXX*/ trace off /* There be many dragons below. */ |
<lang rexx>/*REXX*/ trace off /* There be many dragons below. */ |
||
Line 912: | Line 914: | ||
sw: if ?.linesize=='' then ?.linesize=linesize(); return ?.linesize |
sw: if ?.linesize=='' then ?.linesize=linesize(); return ?.linesize |
||
syntax: !sigl=sigl; call er 13,!fid(2) !fid(3) !sigl !cal() condition('D') sourceline(!sigl) |
syntax: !sigl=sigl; call er 13,!fid(2) !fid(3) !sigl !cal() condition('D') sourceline(!sigl) |
||
wit: call dsay arg(1); call wr arg(1); return |
wit: call dsay arg(1); call wr arg(1); return</lang> |
||
</lang> |