1. Atoms and Sequences
Hello all! Trying to output numerical filenames. eg:
x=x+1
filename="DATA."&x
fn=open(filename,"w")
How can I get the NUMERAL INTEGER to a filename with that extension?
I keep getting characters instead of the number I want.
Thanks for any help ...
Writing in EUPHORIA and lovin' it!
Ray in Colorado
2. Re: Atoms and Sequences
- Posted by Jacques Deschenes <desja at QUEBECTEL.COM>
Dec 13, 1996
-
Last edited Dec 14, 1996
At 18:21 13-12-96 EST, you wrote:
>---------------------- Information from the mail header -----------------------
>Sender: Euphoria Programming for MS-DOS <EUPHORIA at
>MIAMIU.ACS.MUOHIO.EDU>
>Poster: Ray J Connolly <chalkup1 at JUNO.COM>
>Subject: Atoms and Sequences
>-------------------------------------------------------------------------------
>
>Hello all! Trying to output numerical filenames. eg:
>
>x=x+1
>filename="DATA."&x
>fn=open(filename,"w")
>
>How can I get the NUMERAL INTEGER to a filename with that extension?
>I keep getting characters instead of the number I want.
>
>Thanks for any help ...
>Writing in EUPHORIA and lovin' it!
>Ray in Colorado
>
this should do what you want:
filename = "DATA."&sprintf("%03d",{x})
Jacques Deschenes
Baie-Comeau, Quebec
Canada
desja at quebectel.com
3. Re: Atoms and Sequences
On Fri, 13 Dec 1996 22:16:22 -0500 Jacques Deschenes
<desja at QUEBECTEL.COM> writes:
>this should do what you want:
> filename = "DATA."&sprintf("%03d",{x})
It sure does! Thanks, Jacques! Three days of trying, no luck...10 seconds
to write that message and I'm in business!
...now if I could just learn to RTFM!