Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!oliveb!pyramid!prls!philabs!sunrise!ursa!raj From: raj@ursa.UUCP Newsgroups: comp.unix.wizards Subject: PRINTF CONSTRUCT Message-ID: <272@future.ursa.UUCP> Date: Sat, 13-Jun-87 13:07:43 EDT Article-I.D.: future.272 Posted: Sat Jun 13 13:07:43 1987 Date-Received: Tue, 16-Jun-87 00:59:40 EDT Distribution: na Organization: Bear Stearns, New York, NY Lines: 22 Keywords: standard C I have often used the construct printf("%*s\n",i,"#"); to get '#' printed after i blank spaces. For example, the following program could be used to get a plot of the sin function: #include #include main() { int i,j=0; while(1==1){ i = 40+38*sin((double) j++/10.0); printf("%*s\n",i,"#"); }} My question is: Is this allowed in standard C, or am I dealing with some non standard extensions? I could not find this in Kernighan and Ritchie. But then it doesnt talk of enumerated types either.