1827855 Members
1573 Online
109969 Solutions
New Discussion

Re: Line Graphics

 
SOLVED
Go to solution
Paul Murray_4
Frequent Advisor

Line Graphics

Hi All,

Hopefully, this is a very quick question for you ....

I remember back in my ops analyst days, that you could use alternate characters to produce boxes, lines, etc via a normal DCL "write sys$output" command. The result looked similar to the old Digital logo.

Can anyone remember how to get the graphic characters ?

Thanks,
Paul.
Hey, nobody knows EVERYthing !!!
10 REPLIES 10
John Abbott_2
Esteemed Contributor
Solution

Re: Line Graphics

Try

(0 to turn on
(B to turn off

characters l q k x m j are good at drawing boxes

quick example:

$ WRITE SYS$OUTPUT "((0lqqqqqqqqqqk"
$ WRITE SYS$OUTPUT "mqqqqqqqqqqj((B"

The VT220 programmer pocket guide is a good ref. sorry don't have a useful link, only a paperback copy.

Kind Regards
John.
Don't do what Donny Dont does
Heinz W Genhart
Honored Contributor

Re: Line Graphics

Hi Paul

I use a very simple commandfile to create a one line file with some text as required.

$ READ/PROMPT="Enter String >>> "/ERROR=clean_up/END_OF_FILE=clean_up SYS$COMMAND string
$ OPEN/WRITE out c_a.txt
$ esc[0,8] = 27
$ end_char = "''esc'(0x''esc'(B"
$ line1_start = "''esc'#3''esc'[1;7m" + end_char
$ line2_start = "''esc'#4''esc'[1;7m" + end_char
$ line_end = "''end_char'''esc'[m"
$ out_line1 = "''line1_start'"
$ out_line2 = "''line2_start'"
$!
$ cnt = 0
$ len = F$LENGTH(string)
$loop:
$ IF cnt .LT. (len-1)
$ THEN
$ out_line1 = out_line1 + F$EXTRACT(cnt,1,string) + end_char
$ out_line2 = out_line2 + F$EXTRACT(cnt,1,string) + end_char
$ cnt = cnt + 1
$ GOTO loop
$ ELSE
$ out_line1 = out_line1 + F$EXTRACT(cnt,1,string) + line_end
$ out_line2 = out_line2 + F$EXTRACT(cnt,1,string) + line_end
$ GOTO finnish
$ ENDIF
$finnish:
$ WRITE out ""
$ WRITE out "''out_line1'"
$ WRITE out "''out_line2'"
$ CLOSE out
$ TYPE c_a.TXT
$clean_up:
$ EXIT

It creates a file with the name c_a.txt in your default directory. You have to do some customization on this file, so that the string looks as you like

Regards

Heinz
John Abbott_2
Esteemed Contributor

Re: Line Graphics

Sorry slight typo, only one open round bracket required after each escape sequence, not two as suggested. Note the is one character and not five. Assume you know how to create this.
Don't do what Donny Dont does
Paul Murray_4
Frequent Advisor

Re: Line Graphics

SUPERB !!!

I knew it would be an easy one to answer !!

Many thanks,
Paul.
Hey, nobody knows EVERYthing !!!
Steven Schweda
Honored Contributor

Re: Line Graphics

The fine print may be found in a VT100 (or
later) programming manual, as this capability
is really a property of the terminal (or
terminal emulator) being used, rather than
anything about the sending program itself.
Ian Miller.
Honored Contributor

Re: Line Graphics

for more infomation about VTxxx terminals and escape sequences than you ever want to know see http://www.cs.utk.edu/~shuford/terminal/dec.html

and for those who are really obessed about escape sequences
http://bjh21.me.uk/all-escapes/all-escapes.txt

____________________
Purely Personal Opinion
Daniel Fernandez Illan
Trusted Contributor

Re: Line Graphics

Paul
The attached document is a collet of escape sequences for ANSI VT100.

Saludos.
Daniel.
Ian Miller.
Honored Contributor

Re: Line Graphics

and there is http://www.vt100.net/
____________________
Purely Personal Opinion
Karl Rohwedder
Honored Contributor

Re: Line Graphics

I've attached a little FORTRAN program together with a DCL wrapper, which reads a input textfile and replace special characters with e.g. linedrawing, bold, underline... escape sequences.
It may produce simple ASCII text, VT100 or PCL sequences.

E.g. if the input looks like

#######
#1#2#3#
#######

the output in textmode looks like

+-+-+-+
|1|2|3|
+-+-+-+

and in VT100 mode accordingly.

If you no not have a FORTRAN compiler I may send you an object file.

I wrote it 20 years ago, so please do not look at the code too close...

regards Kalle
Paul Murray_4
Frequent Advisor

Re: Line Graphics

Thanks for all your help.
Paul.
Hey, nobody knows EVERYthing !!!