Completed function name_to_number()