ECHOX?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
I just discovered ECHOX (and that it has been around since v15). It's help says
ECHOX is useful for text output when you want to display some text that may have embedded special characters (like %, <. >, or |).
That sounds really good since I'm likely not to know if text from a file (or CLIP:, or CON:) may have embedded special characters. But how do I use it. Getting at such text requires referencing a variable or variable function, and those are not expanded.

Is
Code:
ECHOX some_stuff
anything more than
Code:
ECHO `some_stuff`
?
 
#3
I wanted to do something that simplifies to this.
Code:
do line in @file ( echox %line )
That didn't work.

ECHOX doesn't seem to be of much value if I must type the text I want echoed. In that case, I know if it contains special characters and compared to ECHO, ECHOX only saves a couple of backticks.

Don't you, Charles, have a SAFEECHO? How does it work?
 
#6
You're missing the point - ECHOX isn't intended to partially expand your variables and then automagically determine when to stop expansion. It's intended for echoing literal strings, not variables.
Not automagically ... only expand at the outermost level.
I was more hopeful when I read "ECHOX is useful for text output when you want to display some text that may have embedded special characters".