ksh doesn't allow one to define a type more than once. 

If you type "typeset -T xx=()" twice the second time you'll see the message:
  ksh: xx: type cannot be redefined

How can one see the defined types? Other languages have a defined
function which allows one to test if a symbol has been defined.

For things other than types, one can do something like:

  function _defined {
    (set | grep "^$1=")2>&1 >/dev/null 
  }

But this doesn't work for types. Also note that:
  typeset +p notthere  # same for -p

gives a zero return code whether or not "notthere" is defined or not.

And once a type has been defined, can it be undefined or redefined? If
so, how?
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to