A little bit of strangeness with @Char...

May 24, 2010
855
0
Northlake, Il
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
4,466
88
Albuquerque, NM
prospero.unm.edu
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
 
May 24, 2010
855
0
Northlake, Il
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.
 
Similar threads
Thread starter Title Forum Replies Date
M An oddity that's a little bit scary... Support 6
Peter Murschall A little problem with LEAVE and COMMENT Support 5
MickeyF A little help with @REREPLACE Support 6
M Little bug, big consequences .. Support 6
vefatica ZIP /U a little screwy Support 9
R How to? i need a little help Support 3
M A new problem that has actually got me a little panicky... Support 10
L A little startup help from an old CLI guy please. Support 14
Peter Bratton Another little bug? Support 1
A TCMD 11 little bugs Support 4
H I need a little help. Support 4
C Some little observations Support 16
Peter Murschall Single-line Do-CMD is a bit uncooperative. Support 6
Joe Caverly VBEEP on 64-bit Support 3
vefatica SETP usually fails with a 32 bit process Support 4
rconn Dropping 32-bit support in Take Command & TCC? Support 14
dcantor How to? Can 32-bit TCC be run on a system with 64-bit TCMD and TCC installed? Support 6
T 32 and 64 bit simultaneous portable versions Support 2
vefatica Make FFIND a bit more friendly? Support 14
CWBillow Everything.exe - 64-bit? Support 8
S 32-bit Take Command v22 install for thumb drive Support 1
Per TCC/LE 14 64-bit won't start on Windows 10 Insider Preview 17063 (171213) Support 12
Joe Caverly SETP and 32-bit process Support 2
gworley How to? Take Command 20 64 bit vs 32 bit Support 1
mikea Documentation Consider expanding the docs for 'Everything' a bit Support 10
T 64 bit TCCLE appears to crash when opening tcc.exe from within tcc.exe window Support 7
vefatica Can a subroutine return a 64-bit integer? Support 4
M 64-bit plugins? Support 1
rconn News Take Command 16.03.54 32-bit installer Support 0
rconn News Take Command 16.03.54 32-bit installer fix Support 0
MickeyF problem using COM object in VBScript from v16 x64 TCC but not from v15 32-bit TCC Support 4
JohnQSmith Installing TCMD16 on 32 bit XP Support 12
D New 64-bit install goes to Program Files x86 Support 3
F How to install 64-bit after having installed 32-bit on Win7 Support 2
Dan Glynhampton Bad link to 64 bit RC1 download Support 0
M And oddity re the 32-bit TCC on a 64-bit system... Support 4
C Advantages of 32 or 64 bit TCMD in 64 bit Windows 7 Support 3
C How to determine if system is 32 or 64 bit? Support 5
M How to? Identify 64-bit and 32-bit TCC sessions... Support 7
M WAD A bit of strangeness related to Unicode-marked file not being Unicode Support 2
M A bit of a complaint regarding @FileDate and @FileTime Support 3
K_Meinhard Take Command v13 64-bit Support 9
K_Meinhard 64-bit installer Support 3
M Another bit of weirdness.... Support 0
J CTRL-C does not work on Windows 7 64-bit Support 3
S Take Command LE (32 bit) locking up several times a day Support 14
S 64-bit version use? Support 5
S TCMD 12 64-bit locking up frequently Support 7
rconn v12 Release Build test - 32-bit fixed Support 36
Ville 64-bit command line apps invisible in TCC Support 2

Similar threads