1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Overriding meanings of some characters...

Discussion in 'Support' started by mathewsdw@sbcglobal.net, Dec 6, 2009.

  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?
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    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>
     
  3. 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!
     
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    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.
     
  5. ncnc

    Joined:
    Dec 7, 2009
    Messages:
    2
    Likes Received:
    0
    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! ;)
     
  6. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    Re: Trying to locate programmer Mr. Charles Dye

    Yes, that's me. I'm currently cdye at unm dot edu.

    (Those old DOS programs? I thought those were mercifully forgotten.... )
     
  7. ncnc

    Joined:
    Dec 7, 2009
    Messages:
    2
    Likes Received:
    0
    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)
     
  8. Peter Bratton

    Joined:
    Jul 1, 2008
    Messages:
    81
    Likes Received:
    0
     

Share This Page