• Syntax Error with double "=" in SET =

    From Mvan Le@3:800/432 to All on Fri Jan 1 17:23:24 2010
    Does anybody know how to set a variable in MSDOS batch files with a double equal sign ?

    ... I'm getting Syntax Error with the following:

    SET COMP=ABC=DEF

    in MS-DOS 6.22 because of the double "=" sign.

    Is there a way to escape the "=" sign ?


    --- Maximus 3.01
    * Origin: Xaragmata / Adelaide SA telnet://xaragmata.mooo.com (3:800/432)
  • From Marc Lewis@1:396/45 to Mvan Le on Fri Jan 1 14:19:04 2010
    Hello!

    You were saying...

    Does anybody know how to set a variable in MSDOS batch
    files with a double equal sign?
    ... I'm getting Syntax Error with the following:

    SET COMP=ABC=DEF

    in MS-DOS 6.22 because of the double "=" sign.
    Is there a way to escape the "=" sign?

    I have not found any escape character that will permit command.com to recognise
    an equal sign in the set variable. It's simply a shortcoming of the command interpreter. You can however do precisely what you want under 4DOS (and probably NDOS or DRDOS as well.) (Works for me.) I have the FreeWare versions 7.50 and 8.0 under my file area 1.GEN on the BBS or on the FTP server in /public/gen1. File names are as you would expect. All are virus free and spy-ware free. Give it a shot and see if that helps you out.

    Best regards,
    Marc
    telnet://bbs.sursum-corda.com. >Celebrating 14 years on-line

    -+- QuikEdit 2.41R+

    --- Maximus/2 3.01
    * Origin: Sursum Corda! BBS-Meridian, MS-bbs.sursum-corda.com (1:396/45)
  • From Marc Lewis@1:396/45 to Mvan Le on Fri Jan 1 14:57:46 2010
    <<Following up a message from Marc Lewis to Mvan Le about re: Syntax Error with
    double "=" in SET <var>= >>

    I have not found any escape character that will permit command.com
    to recognise an equal sign in the set variable.
    ~~~~~~~~
    Should read "object" since the "variable" is before the equal sign. Sorry for any confusion!

    Best regards,
    Marc
    Telnet://bbs.sursum-corda.com - Celebrating 14 years on-line.

    -+- QuikEdit 2.41R+

    --- Maximus/2 3.01
    * Origin: Sursum Corda! BBS-Meridian, MS-bbs.sursum-corda.com (1:396/45)
  • From Mvan Le@3:800/432 to Marc Lewis on Sat Jan 2 15:47:18 2010
    I have not found any escape character that will permit command.com to recognise an equal sign in the set variable. It's
    simply a shortcoming of the command interpreter. You
    can however do precisely what you want under 4DOS (and

    Ok.

    I'm starting to think that the current Maximus 3.02 source code wasn't meant to
    be compiled under DOS ... I thougth I'd give it a try to overcome those compiler memory errors.

    probably NDOS or DRDOS as well.) (Works for me.) I
    have the FreeWare versions 7.50 and 8.0 under my file
    area 1.GEN on the BBS or on the FTP server in
    /public/gen1. File names are as you would expect. All
    are virus free and spy-ware free. Give it a shot and
    see if that helps you out.

    Hmm. I'll hold off downloading those for the time being because as previously mentioned, Maximus wasn't meant to be compiled under DOS, so I'll use Windows XP. Things seem to work better under Windows XP.

    --- Maximus 3.01
    * Origin: Xaragmata / Adelaide SA telnet://xaragmata.mooo.com (3:800/432)