Description: The type function maps variables to variable typecodes. (Contributed by Mario Carneiro, 18-Jul-2016)