Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!levels!marwk From: marwk@levels.sait.edu.au Newsgroups: comp.lang.c Subject: Re: escape sequences Message-ID: <15854.27a36867@levels.sait.edu.au> Date: 27 Jan 91 23:55:19 GMT References: <1991Jan26.080726.21670@nntp-server.caltech.edu> Organization: Sth Australian Inst of Technology Lines: 21 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? Thank you, > - Fernando I hope this is what your question requires as an answer. It seems a bit simple to solve, so maybe I don't understand what you mean. char s = "\a"; /* a single character string */ char c; /* a character storage var */ c = *s; /* convert the string character to a single character */ Ray -- University of South Australia | Plus ca change, plus c'est la meme chose. P.O. Box 1 | Ghing thien me how, ming thien gung me how. Ingle Farm | South Australia |