Re: Printing numbers
- Posted by Derek Parnell <derekp at solace.com.au> Nov 21, 2000
- 390 views
Hi Sid, > >I want to take a sequence of integers and turn it into a .csv file - ie a >text file with the numbers as numbers, with commas in between (and maybe >semicolons for line delimiters). No braces or anything, just numbers. > Here is one way of doing this... sequence NumberList integer FldDelim, LineDelim, Delim FldDelim = ',' LineDelim = ';' for i = 1 to length(NumberList) do if i != length(NumberList) then Delim = FldDelim else Delim = LineDelim end if printf(file, "%d%s", {NumberList[i]), Delim}) end for ----- cheers, Derek Parnell