Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

ECHOX?

May
13,202
180
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`
?
 
If you just want to echo the contents of an environment variable without further expansion, you can use SET.
 
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?
 
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".
 
Back
Top
[FOX] Ultimate Translator
Translate