On 8/8/06, aidy rutter <[EMAIL PROTECTED]> wrote:
>
> def enter_data
> x=0
> read_in_test_data.each { |x|
> line = x.chomp
> next if line.upcase == 'ADDRESS:'
>
> object_name = 'A' & "#{11+x}"
I think you want something like
object_name = 'A' + '11' + x.to_s
=> "A111"
either that or you want
x = 11
x = x + 1
object_name = 'A' + x.to_s
=> "A12"
or else I misunderstood the question. Regardless, strings and numbers
can't be added to each other. And numbers can't be concatenated
without making them into strings.
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general