TABLE OF CONTENTS
::pwtk::defineSynonym
SYNOPSIS
proc ::pwtk::defineSynonym {inNN name synonym} {
PURPOSE
Define a synonym for the specified namelist or card. The corresponding namelist or card can be then set using the synonym name.
ARGUMENTS
- inNN ... input namespace name
- name ... PWTK name of namelist or card
- synonym ... synonym name
SOURCE
set inNN ::pwtk::[namespace tail $inNN] if { [info procs ${inNN}::$name] eq {} } { ::pwtk::error "cannot define the \"$synonym\" because the parrent command \"$name\" does not exist" 1 } if { [info procs ${inNN}::$synonym] eq {} && [info procs $synonym] eq {}} { proc ${inNN}::$synonym {content} [concat $name \$content] } else { ::pwtk::error "cannot define the \"$synonym\" because the command already exists" 1 } lappend ${inNN}::exportList $synonym }