Path: utzoo!attcan!uunet!samsung!usc!ucsd!nprdc!malloy From: malloy@nprdc.arpa (Sean Malloy) Newsgroups: comp.lang.c Subject: Re: PRINTUSING function for C? Keywords: print using format c basic Message-ID: <8649@skinner.nprdc.arpa> Date: 20 Jul 90 17:36:17 GMT References: <37@fincomp.UUCP> Reply-To: malloy@nprdc.arpa (Sean Malloy) Organization: Navy Personnel R&D Center, San Diego Lines: 25 In article <37@fincomp.UUCP> root@fincomp.UUCP (Superuser) writes: |I have a situation where some basic software types forms with a statement |like: | call typereal(hp, vp, "$###,###,##.##", realvar); |where hp and vp are x,y coordinates where the output is to be printed, |realvar is a double precision real variable, and that mess in the |middle is a format specifier used by BASIC's PRINTUSING statement. |This statement would cause the value of realvar to be printed in a |dollar and cents format with commas and a floating dollar sign. |If I had a way to handle the printusing statement in C then I could |re-use a bunch of existing BASIC code with just a touch of editing. The latest issue of Dr. Dobb's Journal has an article on writing routines for handling formatted output like this; I suggest that you look there first. | "The three most dangerous Sean Malloy | things in the world are a Navy Personnel Research & Development Center | programmer with a soldering San Diego, CA 92152-6800 | iron, a hardware type with a malloy@nprdc.navy.mil | program patch, and a user | with an idea."