Overriding meanings of some characters...

  • Thread starter mathewsdw@sbcglobal.net
  • Start date
  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
M

mathewsdw@sbcglobal.net

Guest
#1
I have a program (it's not important as to which program or what it does) that sometimes needs the characters "|", ">", and "<" in paramters on its command line. However, these characters (somewhat obviously!) have specific meanings to TCC, and there seems to be no way to override those meanings so as to pass them in as part of the arguments to a program - even putting them in double quotes. Without the author of the program making major (and very inconvenient) changes to the program, is there any know way to pass them in as part of the argument(s) on the command line?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,376
39
Albuquerque, NM
prospero.unm.edu
#2
I have a program (it's not important as to which program or what it does) that sometimes needs the characters "|", ">", and "<" in paramters on its command line. However, these characters (somewhat obviously!) have specific meanings to TCC, and there seems to be no way to override those meanings so as to pass them in as part of the arguments to a program - even putting them in double quotes. Without the author of the program making major (and very inconvenient) changes to the program, is there any know way to pass them in as part of the argument(s) on the command line?
One way is to escape them:

Code:
myprog.exe ^<STUPID arg^=""><stupid arg^>
myprog.exe %=<stupid arg%=><STUPID arg%="">
Another is to use strong quotes:

Code:
myprog.exe `<STUPID arg=""><stupid arg>`
(Since these characters are significant to CMD.EXE as well as to Take Command, I'd have to say that a program which requires them on the command line is not terribly well-thought-out, to say the least....)</STUPID></STUPID></STUPID>
 
M

mathewsdw@sbcglobal.net

Guest
#3
(Since these characters are significant to CMD.EXE as well as to Take Command, I'd have to say that a program which requires them on the command line is not terribly well-thought-out, to say the least....)</STUPID></STUPID></STUPID>
Not that I strongly disagree with you about the "well-though-out" part, the reality is that, since the program is a C/C++ expression calculator, the meaning of those characters in this context has been establishted by the C/C++ programming languages. The other point is that I've had this program for 5 years or more (although it's been quite a while since I last used it), and I'm pretty sure (and I admit that I'm not sure as to why/how) this wasn't a problem in the past. (Is is really possible I never used these operators in the past? I honestly don't know...)

At any rate, the "strong- quote solution" does sort of work (the strong quotes remain in the argument so the author of the program (a friend) has to change the program to ignore them, which, thankfully, he is willing to do), so thank you!
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,376
39
Albuquerque, NM
prospero.unm.edu
#4
At any rate, the "strong- quote solution" does sort of work (the strong quotes remain in the argument so the author of the program (a friend) has to change the program to ignore them, which, thankfully, he is willing to do), so thank you!
By "strong quotes" I mean the back-quote or grave accent character. It's the key to the left of the numeral 1 on most U.S. keyboards. Use that one, and it won't be passed on to the program.

Another -- temporary! -- approach is to use SETDOS /X-56, which disables redirection and piping. That will disable the special meaning of several characters, but of course it also cripples much of the shell's functionality.... SETDOS /X0 gets back to normal.
 
Dec 7, 2009
2
0
#5
Trying to locate programmer Mr. Charles Dye

I'm new to this forum and came here in an attempt to locate the programmer Charles Dye who wrote (probably some time ago) the programs "chksum.com," "cal.com" and "calendar.com" (primarily because I have a question for him with respect to "chksum.com," and the email address that was listed within that program (raster@high...) no longer seems to be valid). Is the "Charles Dye" here one and the same? If so, how may I contact (email? local message?) him? If not, please pardon the interruption, and if you happen to know how I may contact that "other" Mr. Dye, please advise. Thanks. :) Hopefully I can find my way back to this thread to check the answer! ;)
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,376
39
Albuquerque, NM
prospero.unm.edu
#6
Re: Trying to locate programmer Mr. Charles Dye

I'm new to this forum and came here in an attempt to locate the programmer Charles Dye who wrote (probably some time ago) the programs "chksum.com," "cal.com" and "calendar.com" (primarily because I have a question for him with respect to "chksum.com," and the email address that was listed within that program (raster@high...) no longer seems to be valid). Is the "Charles Dye" here one and the same?
Yes, that's me. I'm currently cdye at unm dot edu.

(Those old DOS programs? I thought those were mercifully forgotten.... )
 
Dec 7, 2009
2
0
#7
Thank you for the quick reply, Mr. (or is it Dr.?) Dye!

Thank you for replying -- I will forward to you the original email I had sent to the older, now defunct address. (My main question is whether or not the seconds (e.g., hh:mm:SS) listed in chksum.com's output are ALWAYS 00, 02, 04, 06, or 08 (and never odd values).) After my original post I even wondered if you might be "Doctor Dye"! (Those old DOS programs are still pretty cool! :cool: They show our roots -- I even remember the days of the old TRS-80 computers when we used to save BASIC programs to cassette tape! :D)
 
Jul 1, 2008
81
0
70
Montreal
#8
... use strong quotes:

Charles,
I wrote (but didn't submit) this command in response to ncnc's request. The tilde ~ is my escape character:

echo Special characters `<~~|>?*\/>><<+-:;,."'**!@#$%^&`~`

prints

Special characters <~|>?*\/>><<+-:;,."'**!@#$%^&`

Two consecutive escape character are needed to display a tilde in the output. Shouldn't the escape character also be disabled when between strong quotes?
--
Peter