harris@ecsvax.UUCP (Mark Harris) (07/16/89)
I've run into a problem while writing a batch file. To illustrate, consider the following: SET A=HI SET B=THERE ECHO %A% %B% In DOS 2.1 and 3.3 the batch file has the desired effect: HI THERE is echoed. In DOS 3.0, only HI is echoed. In fact, in DOS 3.0 the first %name% terminates the line. I really need the ability to concatenate string variables, but I don't see how to do it in DOS 3.0. Any words of wisdom out there? This must be a widely-known bug in a single DOS version, but I've never heard of it before. -- Mark Harris mail:harris@ecsvax(UUCP/BITNET) Department of Mathematical Sciences Appalachian State University Boone, NC 28608 (704) 262-3050 office, 264-6906 home
dhesi@bsu-cs.bsu.edu (Rahul Dhesi) (07/17/89)
In article <7342@ecsvax.UUCP> harris@ecsvax.UUCP (Mark Harris) writes: >In DOS 2.1 and 3.3 the batch file has the desired effect: HI THERE is >echoed. In DOS 3.0, only HI is echoed. The general rule for MS-DOS, violations of which are unknown, is that MS-DOS version n.0 always has many bugs, and one should always wait for version n.10 or higher. You might try this: set A=HI set B=THERE ... set MSG=%A% %B% echo %MSG% set MSG= The last line recovers lost environment space. -- Rahul Dhesi <dhesi@bsu-cs.bsu.edu> UUCP: ...!{iuvax,pur-ee}!bsu-cs!dhesi
harris@ecsvax.UUCP (Mark Harris) (07/17/89)
> > You might try this: > > set A=HI > set B=THERE > ... > set MSG=%A% %B% No! This prints HI only - same problem as before. -- Mark Harris mail:harris@ecsvax(UUCP/BITNET) Department of Mathematical Sciences Appalachian State University Boone, NC 28608 (704) 262-3050 office, 264-6906 home