#module s // Defines a module export string HEADERNAME export string VAL // Execution starts here integer colcnt integer memberfnum filenumber = 0 open "member" as member memberfnum = filenumber colcnt = 0 // Set information about a column function get_col_info returns string switch colcnt when 1 headername = "Number" when 2 headername = "Surname" when 3 headername = "Given Names" when 4 headername = "Date of Birth" when 5 headername = "Sex" when 6 headername = "Rating" when 7 headername = "Date Joined" when 8 headername = "Mail Code" when 9 headername = "Played" when 10 headername = "Winnings" otherwise headername = "" colcnt = 0 endswitch result = headername end_function // Each time this function is called // it increments colcnt and sets up // the exported variables for the column export function GETHEADER ; string arg returns string increment colcnt result = get_col_info() end_function // Get the next row of data from // the database export function GETNEXTROW ; string arg returns string find gt member by index.1 if found result = True // reset the column counter colcnt = 0 end_function export function GETNEXTCOL; string arg returns string increment colcnt // result is true if colnum // is still in range if colcnt < 11 result = True if result val = ; field (memberfnum, colcnt) end_function