Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!haven!purdue!decwrl!decvax!ima!mirror!frog!rmk From: rmk@frog.UUCP (Rick Kelly) Newsgroups: comp.sys.ibm.pc Subject: Re: switchar character under MSDOS Keywords: '/' '-' source code assembler Message-ID: <1154@frog.UUCP> Date: 23 Mar 89 02:53:00 GMT References: <6202@bsu-cs.UUCP> <1150@frog.UUCP> Reply-To: rmk@frog.UUCP (Rick Kelly) Organization: Charles River Data Systems, Framingham MA Lines: 43 In article <1150@frog.UUCP> rmk@frog.UUCP (Rick Kelly) writes: > > There are two undocumented library routines in Turbo C for setting >and inspecting the switch character. I don't have the information close at >hand but I will post it tomorrow. > >Rick Kelly >Test Engineering >Charles River Data Systems >983 Concord St. >Framingham, Mass. 01701 It is now tomorrow and here are the undocumented routines: 1. Examine switch character getswitchar() - returns a char 2. Set switch character setswitch ar(char c); Here is a scrap of code that compiles and runs under Turbo C 1.5. main(argc, argv) int argc; char *argv[]; { if(argc == 1) /* no args on command line */ printf("switchar: %c\n", getswitchar()); else { setswitchar((*++argv)[0]); /* set the switch char */ printf("switchar: %c\n", getswitchar()); /* check results */ } } Rick Kelly Test Engineering Charles River Data Systems 983 Concord St. Framingham, Mass 01701