Advertisement
Guest User

Untitled

a guest
Jul 24th, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function ap_lat(ap_code)
  2.   file = assert( io.open("Airports.txt", "r") )
  3.   for line in file:lines() do
  4.     local fields = { line:match("(%w+)|".. ap_code .."|([%w ]+)|([%d-]+)|([%d-]+)|([%d-]+)") }
  5.     if #fields > 0 then
  6.       print(fields[3], fields[4])
  7.     end
  8.   end
  9.   file:close()
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement