Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!gatech!mcnc!rock.concert.net!abc From: abc@rock.concert.net (Alan Clegg) Newsgroups: comp.unix.questions Subject: Re: how do I declare a constant as a variable of different type Message-ID: <1991May23.164634.22086@rock.concert.net> Date: 23 May 91 16:46:34 GMT References: <16452@helios.TAMU.EDU> Organization: MCNC Center for Communications Lines: 26 In article <16452@helios.TAMU.EDU> Sharma Anupindi writes: " I want to declare the string I have read from the file as a different " variable. "Ex: " If my file contains the string "Mr.Brilliant", then name will contain the " same string. " Now I want to declare "Mr.Brilliant" as a integer, for further use in the " program. And I wanted to know how to do that. You want to create a variable name from some input you read? Let me re-phrase your question and see if I understand it... You read a string from a file. The string you read is "fred". You then want to create an integer variable named fred? I don't know how to do this on the fly... -abc -- "this is a hellacious hairball and we | Alan Clegg - Network Programmer need to start by acknowledging that | MCNC -- Center for Communications everybody can't get what they want" | Research Triangle Park, NC, USA [ Paul Vixie, on RFC-822 Extensions ] | abc@concert.net, abc@mcnc.org