|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| 09/26/2009 at 10:51AM PDT, ID: 24764198 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: |
if __FILE__ == $0
def loadDictionary()
#Stores each line from file into an array
dictionary = File.open("a7.txt", "r")
lines = dictionary.readlines
lines.each do|line|
#puts "I read this line: #{line}"
##### Reads in file and prints line by line #####
#count = 1
#dictionary = File.new("a7.txt", "r")
#while(line = dictionary.gets)
#puts "#{count}: #{line}"
#count = count + 1
#end
end
end
def loadFile(fileName)
hashTable = {}
File.open(fileName) do |processFile|
processFile.each do |line|
key, value = line.chomp.split("\t")
hashTable[key] = value
end
end
end
loadFile("FCTVacationSpecials1.txt")
end
|
Advertisement