[comp.sys.ibm.pc] 4dos quirks

WELCH@bclcl1.im.battelle.org (Bill Welch (614)424-7155) (05/01/90)

Is there any way in 4DOS v3 to raise the number of nested batch files?
4DOS is currently limited to 4 by my testing (the manual says 5) ...
this is a lot lower than DOS 3.3 which seems to be unlimited.


I have noticed two other minor differences between 4DOS and DOS 3.3:

(1)

4DOS IF statment bombs if the strings contain a / in them:

  IF (....../....)==(xxxxxxx)    will abort on an error


Placing spaces around the == gets around the problem

  IF (...../.....) == (xxxxxxx)    works just fine

(2)

In DOS "ECHO[" will display a blank line but fails in 4DOS. An "ECHO." will
generate a blank line in both 4DOS and DOS3.3.

-----------------------------------------------------------------------------
 Bill Welch                     Internet: WELCH@BCLCL1.IM.BATTELLE.ORG
 Battelle Memorial Institute    Bitnet: WELCH%BCLCL1@OHSTPY 
 505 King Avenue                Packet Radio: W8LLU @ W8CQK.OH.USA.NA
 Columbus, Ohio 43201           Voice: (614)424-7155  Fax: (614)424-5263

cgf@ednor.bbc.com (Chris Faylor) (05/05/90)

I have noticed that 4dos screws up with the use of slashes in pathnames.
Supposedly it has the ability to use '/' or '\' interchangeably in a path
specification when the usage is unambiguous.  So, it seems to me that
the following should work:

cd /foo/bar

Since cd does not take any qualifiers.  Either that or 4dos should complain.
What it does is change your directory to the /foo.  Not exactly intuitive.

I am registering it anyway, despite its quirks.  I think 4dos is a vast
improvement over COMMAND.COM
-- 
Chris Faylor		Boston Business Computing, Ltd.
cgf@ednor.bbc.com	President: Anti Usenet-Obsessive-Behavior Society

The opinions expressed here just might represent the opinions of this company.

cs132071@cslab5g.cs.brown.edu (Joel Scotkin) (05/06/90)

In article <1990May5.014627.2792@ednor.bbc.com>, cgf@ednor.bbc.com
(Chris Faylor) writes:
|>I have noticed that 4dos screws up with the use of slashes in pathnames.
|>Supposedly it has the ability to use '/' or '\' interchangeably in a path
|>specification when the usage is unambiguous.  So, it seems to me that
|>the following should work:
|>
|>cd /foo/bar
|>
|>Since cd does not take any qualifiers.  Either that or 4dos should complain.
|>What it does is change your directory to the /foo.  Not exactly intuitive.
|>


The problem is that 4dos has a special setting in the setdos environment
which controls what character is currently being used as a "switch". 
This is normally set to the `/` key, and this can cause problems, and
just doesn't work so well when you want to change directory.  The fix,
which is mentioned in only one line in the file upgrade30.doc (as far as
I can telL) is to use setdos /w- (note:I think the character is w.  I
could be wrong - I am doing this by memory.  If not, look in the ugrade
file.)  This will set the switchar to `-`, and allow both slashes to
work as directory changers.  It also means, however, that dir /p becomes
dir -p, etc.  This change is implemented, but not really encouraged,
since many programs do not check the dos switchar, assume that it is the
`/`, and will cause problems when they can't do something they want to.


					Joel Scotkin   
                 

daj@beach.cis.ufl.edu (David A. Johns) (05/07/90)

In article <HUOPIO.90May7093634@kannel.lut.fi> huopio@kannel.lut.fi (Kauto Huopio) writes:

>Has anybody got totally mysterious "Unknown parameter /z" -messages
>
> ...
>
>--Kauto
>--

One thing to check ... I got "unknown command" and "unknown parameter"
messages when I was trying out 4dos 2.1 or 2.2, and I finally figured
out that the problem was always occurring at the end of batch files.
It seems that 4dos wanted a blank line after the last line of a batch
file.  Could this be happening to you?

huopio@kannel.lut.fi (Kauto Huopio) (05/07/90)

Has anybody got totally mysterious "Unknown parameter /z" -messages
when trying to execute a program which is an another drive, but the
directory is in PATH-statement. I have had terrible problems with
Nethack 2.3 (I think) and Norton Integrator. These messages seem to
come from the command processor..

--Kauto
--
****************** Kauto Huopio (huopio@kannel.lut.fi) **********************
*US Mail: Kauto Huopio, Punkkerikatu 1 A 10, SF-53850 Lappeenranta, Finland * 
*Project: Learn some GNU Emacs first.. :-)                                  *
*****************************************************************************

huopio@kannel.lut.fi (Kauto Huopio) (05/08/90)

> One thing to check ... I got "unknown command" and "unknown parameter"
> messages when I was trying out 4dos 2.1 or 2.2, and I finally figured
> out that the problem was always occurring at the end of batch files.
> It seems that 4dos wanted a blank line after the last line of a batch
> file.  Could this be happening to you?

No, I tried to use Nethack straight from the DOS (or should I say
4DOS) prompt. The most mysterious note is that the "unknown parameter"
message seems to come more often when my current drive is C: , when
using D: there seems to be less errors..
I have checked the whole system with SCANV61 and found no any virus
infections. How you have set up Nethack? Has 4DOS caused you any
troubles with nhack ?

--Kauto
--
****************** Kauto Huopio (huopio@kannel.lut.fi) **********************
*US Mail: Kauto Huopio, Punkkerikatu 1 A 10, SF-53850 Lappeenranta, Finland * 
*Project: Learn some GNU Emacs first.. :-)                                  *
*****************************************************************************

cgf@ednor.bbc.com (Chris Faylor) (05/08/90)

In article <38880@brunix.UUCP> cs132071@cslab5g.cs.brown.edu (Joel Scotkin) writes:
>In article <1990May5.014627.2792@ednor.bbc.com>, cgf@ednor.bbc.com
>(Chris Faylor) writes:
>|>I have noticed that 4dos screws up with the use of slashes in pathnames.
>|>Supposedly it has the ability to use '/' or '\' interchangeably in a path
>|>specification when the usage is unambiguous.  So, it seems to me that
>|>the following should work:
>|>
>|>cd /foo/bar
>|>
>|>Since cd does not take any qualifiers.  Either that or 4dos should complain.
>|>What it does is change your directory to the /foo.  Not exactly intuitive.
>|>
>
>
>The problem is that 4dos has a special setting in the setdos environment
>which controls what character is currently being used as a "switch". 
>This is normally set to the `/` key, and this can cause problems, and
>just doesn't work so well when you want to change directory.

I am aware of this setting, but I didn't think it was necessary in this case.
I was under the (mis?) impression that it was not necessary to use backslashes
where the command was known to 4dos and took no qualifiers.  The candidates
for this (off the top of my head) are:

cd
cdd
mkdir
rd

In any event, whatever the operation switch character SHOULD be, the behavior
of 4DOS in normal operation is very counter-intuitive.  If '/' is not valid
at all for a path separator, then 4DOS should issue an error, not allow the
first occurrence and ignore the rest.
-- 
Chris Faylor		Boston Business Computing, Ltd.
cgf@ednor.bbc.com	President: Anti Usenet-Obsessive-Behavior Society

The opinions expressed here just might represent the opinions of this company.

richard@calvin.spp.cornell.edu (Richard Brittain) (05/09/90)

In article <1990May8.125326.601@ednor.bbc.com> cgf@ednor.bbc.com (Chris Faylor) writes:
>In article <38880@brunix.UUCP> cs132071@cslab5g.cs.brown.edu (Joel Scotkin) writes:
>>The problem is that 4dos has a special setting in the setdos environment
>>which controls what character is currently being used as a "switch". 
>>This is normally set to the `/` key, and this can cause problems, and
>>just doesn't work so well when you want to change directory.
>
>I am aware of this setting, but I didn't think it was necessary in this case.
>I was under the (mis?) impression that it was not necessary to use backslashes
>where the command was known to 4dos and took no qualifiers.  The candidates

4DOS 2.21 handled cd /dir/subdir with no problems, but 3.0 has a problem with
it.  It seems that the command line parsing was entirely re-written for 3.0
and is mostly more consistent now, but there are still quirks.  I run with
"setdos /w-" most of the time, and this works with nearly everything commonly
use.  For those that don't work, I alias them to "setdos -w/^command^setdos /w-"

The main problem with using the switchar is that 4dos.com doesn't know about
it, only 4dos*.exe - so you still need to generate "4dos /c command" in a 
system() call or other "Shell to dos" type call.  With "4dos -c command" you
get  an annoying diagnostic about swapping, then "-c command not found", and
finally "command" is actually executed correctly.  I hope this gets fixed in
the next version.  The other problem with using the switchar is that it can
be tricky to use setdos to change it back - you have to know what the current
setting is before you can do anything.  I keep a variable %_SWITCH at all times
so my batch files will work in either mode.

Richard Brittain,                   School of Elect. Eng.,  Upson Hall   
                                    Cornell University, Ithaca, NY 14853
ARPA: richard@calvin.spp.cornell.edu	
UUCP: {uunet,uw-beaver,rochester,cmcl2}!cornell!calvin!richard