Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!wuarchive!rex!rouge!dlbres14 From: dlbres14@pc.usl.edu (Brumley David M) Newsgroups: comp.lang.c Subject: Re: Can pre-ANSI C Preprocessor handle symbolic constants in strings? Message-ID: Date: 12 Jun 91 15:20:07 GMT References: <1991Jun4.201629.29013@athena.mit.edu> Sender: anon@rouge.usl.edu Organization: Univ. of Southwestern LA, Lafayette Lines: 16 In-reply-to: rjohnson@shell.com's message of 10 Jun 91 16:42:52 GMT In article rjohnson@shell.com (Roy Johnson) writes: In compensation, I illustrate your suggestion: char fmt[10]; /* The first two %'s make one % in the string */ sprintf(fmt, "%%%ds", FIELDSIZE); scanf(fmt, buffer); which is, dare I say, standard, portable, and correct? Yes, I just can't believe you have to build the format string dynamically with pre-ANSI compilers. -- David M. Brumley