Thread View: net.micro.pc
4 messages
4 total messages
Started by roper
Sun, 26 Oct 1986 19:10
switchar
Author: roper
Date: Sun, 26 Oct 1986 19:10
Date: Sun, 26 Oct 1986 19:10
14 lines
1050 bytes
1050 bytes
What is "switchar"? I have stumbled across a couple of cryptic
references to it and my curiosity is piqued. From what I was
able to infer, it seems to be an environment variable in DOS that
can be set to change the character used as a separator in pathnames.
I tried it several ways but couldn't get it to work (DOS 3.2).
I would like to be able to use the '/' character in any event.
--
--Michael Roper ARPA: roper@june.cs.washington.edu
UUCP: {ihnp4|decvax|ucbvax}!uw-beaver!uw-june!roper
CSNET: roper.uw-june@rand-relay
Re: switchar
Author: John Allen
Date: Mon, 27 Oct 1986 16:10
Date: Mon, 27 Oct 1986 16:10
25 lines
1910 bytes
1910 bytes
In article <1402@uw-june> roper@uw-june.UUCP writes:
>What is "switchar"? I have stumbled across a couple of cryptic
>references to it and my curiosity is piqued. From what I was
>able to infer, it seems to be an environment variable in DOS that
>can be set to change the character used as a separator in pathnames.
>I tried it several ways but couldn't get it to work (DOS 3.2).
>I would like to be able to use the '/' character in any event.
There is an undocumented DOS function (sorry, I don't have it at hand)
which allows the switch character to be read or set. The switch character,
as the name implies, is used to delineate command line switches. The
default character is '/' under DOS. I like to use '-' instead, since
I'm likely to type that without thinking about it. Every DOS command,
Microsoft C, and many others seem to use the undocumented call to read
the switch character, or atleast accept the '-' that I like to use.
When the switch character is something other than a slash, Unix-like
path names may be used in almost all circumstances.
John Allen
=========================================================================
NetExpress Communications, Inc. seismo!{sundc|hadron}!netxcom!jallen
1953 Gallows Road, Suite 300 (703) 749-2238
Vienna, Va., 22180
=========================================================================
Re: switchar
Author: Bill Mayhew
Date: Tue, 28 Oct 1986 13:26
Date: Tue, 28 Oct 1986 13:26
49 lines
2191 bytes
2191 bytes
Hi, You are correct that switchar seems to be broken in DOS 3.x. Following is a brief batch file that you can run that uses debug to to create a small .com file that allows you to set the switch character at the prompt level in (seemingly) any version of DOS. Be careful though, some programs are to dumb to realize that you've changed the switchar, and will bomb when they call their overlays. Bill Mayhew: (wtm@neoucom.UUCP ...!cbatt!neoucom!wtm) ------------------------previous article----------------------- >From few@well.UUCP Wed May 28 01:33:54 1986 >Newsgroups: net.micro >Subject: Re: Changing SWITCHAR in dos 3.x > >In article <883@brl-smoke.ARPA> bridger@RAND-UNIX.arpa writes: >>The MS-DOS COMMAND.COM shell uses the forward slash '/' >>as its SWITCHAR to designate command-line parameters. >>In dos versions 2.x the following line could be added >>to the CONFIG.SYS file to change that character to a '-', >>allowing the '/' to be used as a separator for directory >>names in a path: >> SWITCHAR=- >>This doesn't work for dos 3.1. Is there another way to do it? > >I've posted this program a couple of times, but never this way before. >Save the following as SW.BAT: >----- goto END e 100 F6 06 80 00 FF 74 09 8A 16 82 00 B8 01 37 CD 21 e 110 B8 00 37 CD 21 88 16 30 01 BA 22 01 B4 09 CD 21 e 120 CD 20 53 77 69 74 63 68 20 63 68 61 72 20 3D 20 e 130 00 0D 0A 24 rcx 34 n switch.com w q :END debug <sw.bat >----- >SWITCH will tell you what the current switch character is, while >SWITCH c will set the switch character to c. >-- >Frank Whaley >EFS Management Software, Inc.
Re: switchar
Author: Don Kneller%Langridge
Date: Thu, 30 Oct 1986 01:11
Date: Thu, 30 Oct 1986 01:11
21 lines
1574 bytes
1574 bytes
In article <145@netxcom.UUCP> jallen@netxcom.UUCP (John Allen) writes: >In article <1402@uw-june> roper@uw-june.UUCP writes: >>What is "switchar"? I have stumbled across a couple of cryptic >>references to it and my curiosity is piqued. > >The switch character, >as the name implies, is used to delineate command line switches. The >default character is '/' under DOS. I like to use '-' instead, since >I'm likely to type that without thinking about it. Every DOS command, >Microsoft C, and many others seem to use the undocumented call to read >the switch character, or atleast accept the '-' that I like to use. Be careful though. LINK and LIB don't use switchar, relying on / only. Also, when switchar is -, for COMMAND.COM you *must* give the path to executable files with /; \ won't work anymore. Eg. \bin\cl is now /bin/cl. The above applies for DOS 3.1 -- Don Kneller UUCP: ...ucbvax!ucsfcgl!kneller ARPA: kneller@cgl.ucsf.edu BITNET: kneller@ucsfcgl.BITNET
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads