# First create a map of values.
int [string] ordinal;
ordinal ["First"] = 1;
ordinal ["Second"] = 2;
ordinal ["Third"] = 3;
ordinal ["Fourth"] = 4;
# Let's write that information to a text file
map_to_file( ordinal , "test.txt" );
# We now have a file whose first value is First, Second, Third, Fourth followed by a tab and then a number.
# Note that the file is in alphabetical order of the index! After each index is the value assigned to that index.
# If you care about the order of the lines, then I'd suggest that you index them with integers instead of strings.
# Now let's read that information into a map called reord
int [string] reord;
file_to_map( "test.txt", reord );
# Print it out!
foreach key in reord
print( key + " is " + reord[key] );