delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/1997/04/02/09:14:48

From: "Matthias Paul" <MPAUL AT ibh DOT rwth-aachen DOT de>
Organization: IBH, RWTH-Aachen
To: opendos AT delorie DOT com
Date: Wed, 2 Apr 1997 16:09:36 GMT+0100
Subject: Re: YESCHAR
Reply-to: Matthias DOT Paul AT post DOT rwth-aachen DOT de
Message-ID: <D63FAC39DA@ibh.rwth-aachen.de>

Hi!

On Wed, 02 Apr 1997, Mark Aitchison wrote:

> 1. I'd like to see commands like PUSH YesChar and POP YesChar for
>     batch files so that regions of the batch file can temporarily
>     change environment variables and pseudo-variables.

Yep.  Probably like with 4DOS...

[SwitChar]
> 2. I'd also like to see the ability to set the switchar, yeschar for
>     different tasks separately. (Not sure if SwitchChar can be set
>     other than on  a system-wide basis; I guess that other characters
>     proposed such as YesChar, FileChar would be set/obtained by similar
>     DOS calls  that store bytes in some global RAM??)

Oh yes, I forgot about the SwitChar.  Of course, we should also 
reintroduce the old MS-DOS 2.xx CONFIG.SYS SWITCHAR= directive, and
add a %SwitChar% system function for switchar-independent batchjobs.

DR DOS, Novell DOS, and OpenDOS fully support the SwitChar-API,
PTS/DOS and OS/2 do also, but Multiuser DOS, and later MS-DOS/PC-DOS 
do not.  The SwitChar setting is global to the system.  

Currently most of the external utilities do honore the SwitChar 
setting, and now even COMMAND.COM honors it (at least in the latest 
updates to Novell DOS).  What is missing for most utilities are 
updated help screens and /? help options.  Changing the SwitChar from 
its default '/' may lead to strange results with some commands, since 
'/' and '-' are somewhat overloaded by functionality.  I propose to 
slightly enhance the syntax of all commands, e.g. ATTRIB -R (with a 
switchar='/') should allowed to be written as ATTRIB R-, ATTRIB /-R 
alias ATTRIB /R- (with switchar='/') and as ATTRIB --R alias 
ATTRIB -R- (with switchar='-').  Of course, there are some more 
caveats, but such an enhanced syntax does not bring any compatibility 
problems, is easy to implement, and could avoid any further 
misinterpretation in a future fully-switchar-enabled environment...

Besides, if the SwitChar is changed from '/', COMMAND.COM modifies the 
first (and only the first) backslash '\' in a PROMPT $p and CD/CHDIR 
to a '/'.  This is a nice remainder of a changed switchar setting and
can also be used to detect the current switchar setting out of 
batchjobs (which is quite complicated, have a look at SWC.BAT from 
my MPDOSTIP.ZIP package).  4DOS does not do the same.

> 3. It is probably a good idea not to quote too much of an original 
>    message; I've probably gone too far the other way in quoting 
>    none! ;-) 

Indeed!  But not in this short message, anyway... ;-)

Bye,

 Matthias
 
------------------------------------------------------------------
 Matthias Paul     ! My eMail address has changed. For some time !
 Ubierstrasse 28   ! mails to former <MPaul AT ibh DOT rwth-aachen DOT de>  !
 D-50321 BRUEHL    ! will be forwarded to the new address.       !
 eMail: <Matthias DOT Paul AT post DOT rwth-aachen DOT de>                       
 WWW  : URL: http://www.rhrz.uni-bonn.de/~uzs180/mpdokeng.html    
------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019