Version 1 of info type

Updated 2013-07-10 13:20:45 by rmax

DKF: Proposed new feature for Tcl. [See fossil branch dkf-command-type ]

info type commandName

Returns a string describing the “type” of the command called commandName. For procedures, it returns proc, for native commands, native, for aliases, alias. There's a few others too. Does not dig deep into the complexities of what the command is, but does provide you with enough information to figure out what sort of introspection to use next.

rmax: Maybe the command should be called [info commandtype] (or [info cmdtype] for short), to avoid confusion with other meanings of "type" (e.g. in the sense of typed variables).