Given a string, a routine that converts the string to a long, without using built in functions