Path: utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!brolga!exnirad From: exnirad@brolga.cc.uq.oz.au (Nirad Sharma) Newsgroups: comp.lang.c Subject: Re: escape sequences Message-ID: <1991Jan27.053717.4772@brolga.cc.uq.oz.au> Date: 27 Jan 91 05:37:17 GMT References: <1991Jan26.080726.21670@nntp-server.caltech.edu> <14992@smoke.brl.mil> Organization: Prentice Computer Centre, The University of Queensland, Australia. Lines: 20 gwyn@smoke.brl.mil (Doug Gwyn) writes: >In article <1991Jan26.080726.21670@nntp-server.caltech.edu> fjs@nntp-server.caltech.edu (Fernando J. Selman) writes: >>Is there a way to conver the string (e.g.) "\a" to >>the constant '\a' at run time, without writing my >>own lookup table? >Judging from the "Subject:" line, what you are actually after is a >way to convert a string such as "\\a" to the character '\a'. Since >this amounts to a part of the normal job of compilation, but you >want instead to defer the action to run time, the answer is that >there is no simple way to do this. Use of a lookup table is >probably the easiest method. What about sprintf ? Nirad Sharma Continuing Education Unit The University of QUeensland AUSTRALIA