Discussion:
How to #OUTPUT the & character
(too old to reply)
Keith
2023-11-17 02:33:57 UTC
Permalink
I want to print the & character from #OUTPUT. Tried setting #OUTFORMAT and #INFORMAT but it doesn't seem to work. TACL keeps thinking it is a continuation char.
Randall
2023-11-17 19:41:30 UTC
Permalink
Post by Keith
I want to print the & character from #OUTPUT. Tried setting #OUTFORMAT and #INFORMAT but it doesn't seem to work. TACL keeps thinking it is a continuation char.
Does this work?

#SET #OUTFORMAT PRETTY
#OUTPUT Hello ~&

You can also try
#OUTPUT Hello ~&~_
j-ma...@pacbell.net
2023-11-17 20:41:31 UTC
Permalink
This is probably overkill, but it's what I do when I need to output control characters:

[#DEF DELTA^CMD DELTA |BODY|J38I]
[#DEF AMPERSAND TEXT |BODY|[#DELTA /COMMANDS DELTA^CMD/]]
#output Here is an Ampersand: [AMPERSAND]

Jon Marcus
Randall
2023-11-18 18:53:08 UTC
Permalink
Post by j-***@pacbell.net
[#DEF DELTA^CMD DELTA |BODY|J38I]
[#DEF AMPERSAND TEXT |BODY|[#DELTA /COMMANDS DELTA^CMD/]]
#output Here is an Ampersand: [AMPERSAND]
Jon Marcus
Well, if you're going to use DELTA... (good show)
JShepherd
2023-11-20 15:31:21 UTC
Permalink
Post by Keith
I want to print the & character from #OUTPUT. Tried setting #OUTFORMAT and
#INFO
Post by Keith
RMAT but it doesn't seem to work. TACL keeps thinking it is a continuation
char.



[#def CHARACTER struct
begin
byte ampb value 38;
char amp redefines ampb;
end;
]
#output [CHARACTER:amp]


== similar with 6530 control codes
[#def T6530 struct
begin
byte b0(0:1) value 27 73 ;
char clear(0:1) redefines b0;
byte b1(0:1) value 27 111 ;
char line25(0:1) redefines b1;
end;
]

[#output [T6530:line25(0:1)] Line 25 Text ]

==
== have tacl put session info on line 25
==
?section _prompter routine
#frame
#push _text
[#def T6530 struct
begin
byte b0(0:1) value 27 73 ;
char clear(0:1) redefines b0;
byte b1(0:1) value 27 111 ;
char line25(0:1) redefines b1;
end;
]
#set _text [#DEFAULTS] [#MYTERM] [#USERNAME [#PROCESSINFO/PAID/]]
#set _text [_text] [#PROCESSINFO/processid/]
#set _text [#SHIFTSTRING /down/ [_text] ]
[#output [T6530:line25(0:1)] [_text] ]
#unframe

Loading...