2
Int変換文字列をバイナリデータにエクスポートする必要があるので、マイクロコントローラで使用できます。ここでruby 2.2.4(Windows)でデータをシリアライズしてエクスポートする方法は?
は、コードの一部です:
def save_hex
text_hex = File.new("hex_#{@file_to_translate}.txt", "a+")
@text_agreschar.each_with_index do |string_agreschar, index|
string_hex = ''
string_agreschar.each do |char_agreschar|
string_hex << char_agreschar.agres_code.to_i
end
text_hex.print(string_hex)
text_hex.puts('')
end
end
私はバイナリファイルではなく、テキストの中に、私の「string_hex」をエクスポートする必要があります。私は、Windows 7で
はどうもありがとう...問題は解決します!それはまさに私が探していたものでした。 –