A little bit of strangeness with @Char...

#1
I am writing a program where I needed to have both the ASCII codes for some particular characters and the characters for some particular ASCII codes, and I was using the @ASCII and @Char functions from the command line for these purposes. However, I accidentally discovered a very strange result with @Char which is easily illustrated by the command sequence and its results as shown below:

Code:
[Z:\]Echo      %@Char[124]

[Z:\]Echo      "%@Char[124]"
     "|"
Certainly not a "critical" issue, but really rather strange...
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,724
47
Albuquerque, NM
prospero.unm.edu
#3
On the other hand, a null (empty) command has long been perfectly valid in Take Command (4NT, 4DOS...) For instance, you can create an empty zero-byte file by redirecting from a null command:

Code:
> test.out
 
#4
On the other hand, a null (empty) command has long been perfectly valid in Take Command (4NT, 4DOS...) For instance, you can create an empty zero-byte file by redirecting from a null command:

Code:
> test.out
Charles, you are, of course, correct. I keep forgetting about those "special characters" in TCMD/TCC that can cause real problems when used in file names (and "SetDos" doesn't do it either because in most situations I would still prefer these characters to maintain their "traditional" meanings outside of file names; and I'll add that the vast majority of files that I have whose names cause problems for TCMD/TCC came from "external" sources; I learned a long time ago not to use any of the "forbidden" characters in file names...) And, as I final note, this is why my intent to write batch files rather than C++ programs for programs that handle file names is, in most cases, severely "rolled back"; if I write a program that handles file names it has to be able to handle all file names no matter what they are.