[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: {newb} file and puts
From: STEPHEN BECKER I V <Becker004 () gmail ! com>
Date: 2004-10-12 20:01:58
Message-ID: 3703ec2d04101213014529309b () mail ! gmail ! com
[Download RAW message or body]
Thank you so much! That kinda sucks when you need to output an int,
you need to remember the to_s
Thank you again
Becker
On Wed, 13 Oct 2004 04:56:38 +0900, Carlos Tirado
<li_rubytalk@tremendo.com> wrote:
> change last line:
>
> loc.puts((i+65).chr+' '+a[i].to_s) if a[i]>0
>
> C
>
> From: STEPHEN BECKER I V <Becker004@gmail.com>
> Date: Wed, 13 Oct 2004 04:45:34 +0900
>
>
>
> >f="z:\t.txt"
> >loc = File.open(f, "w+")
> >loc.puts((i+65).chr,' ',a[i]) if a[i]>0
> >
> >
> >Nevermind what it is writing, How do i keep the (i+65).chr and a[i] on
> >the same line in the file? i get
> >A
> >
> >30
> >B
> >
> >23
> >C
> >
> >43
> >D
> >
> >28
> >E
> >
> >47
> >and i want
> >A 30
> >B 23
> >C 43
> >D 28
> >E 47
> >
> >Becker
> >
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic