From: Matt Brooks Date: 2009-09-22T01:27:28+09:00 Subject: Re: Incrementing variable names in a loop? So I guess technically the way to phrase it is, incrementing method names... my bad. Also, I tried both ways, neither seemed to work... It just outputs nothing, and there is not even an error, I tried to catch an error and there wasn't one, the output just says pan_data_bin_0 through pan_data_bin_49, without any data after the colon. Excuse the calls from object to object, I got tired of stripping the code. framework object creates a binary object that has an array created... I think we are on the right track though...Did I implement one of these incorrectly? framework.binary.pan_data_signals[index_pan_data_signal].num_bins.times do |bin_number_index| value = framework.binary.pan_data_signals[index_pan_data_signal].send("bin_#{bin_number_index}") framework.write_log("Pan Data Bin_\##{bin_number_index}: #{value}") end bin_number_index = 0 while bin_number_index < framework.binary.pan_data_signals[index_pan_data_signal].num_bins pan_data_variable = "pan_data_bin_#{bin_number_index}".to_sym call = framework.binary.pan_data_signals[index_pan_data_signal] + pan_data_variable framework.write_log("Pan Data Bin_\##{bin_number_index}: #{call}") bin_number_index += 1 end -- Posted via http://www.ruby-forum.com/.