# File lib/Getopt/Declare.rb, line 220
      def ScalarArg.addtype(abbrev, pattern, action, ref)

        typeid = ":#{abbrev}"
        unless (pattern =~ /\S/)
          pattern = ":s"
          ref = 1
        end
        
        @@stdtype[typeid] = {}
        @@stdtype[typeid]['pattern'] = "(?:#{pattern})" if pattern && !ref
        @@stdtype[typeid]['pattern'] = ":#{pattern}" if pattern && ref
        @@stdtype[typeid]['action']  = action if action
        @@stdtype[typeid]['ind']     = ref

      end