scope
Returns information about a symbol's scope
Format:
TV::scope action [ object-id ] [ other-args ]
Arguments:
action
The action to perform, as follows:
cast
Attempts to find or create the type named by the other-args argument in the given scope.
commands
Displays the subcommands that you can use. The CLI responds by displaying the subcommands shown here. Do not use additional arguments with this subcommand.
dump
Dump all properties of all symbols in the scope and in the enclosed scope.
get
Returns properties of the symbols whose soids are specified. Specify the kinds of properties using the other-args argument.
If you use the -all option as an object-id, the CLI returns a list containing one (sublist) element for each object.
lookup
Look up a symbol by name. Specify the kind of lookup using the other-args argument. The values you can enter are:
by_language_rules: Use the language rules of the language of the scope to find a single name.
by_path: Look up a symbol using a pathname.
by_type_index: Look up a symbol using a type index.
in_scope: Look up a name in the given scope and in all enclosing scopes, and in the global scope.
lookup_keys
Displays the kinds of lookup operations that you can perform.
properties
Displays the properties that the CLI can access. Do not use additional arguments with this option. The arguments displayed are those that are displayed for the scope of all types. Additional properties also exist but are not shown.(Only the ones used by all are visible.) For more information, see TV::symbol.
walk
Walk the scope, calling Tcl commands at particular points in the walk. The commands are named using the following options:
-pre_scope tcl_cmd: Names the commands called before walking a scope.
-pre_sym tcl_cmd: Names the commands called before walking a symbol.
-post_scope tcl_cmd: Names the commands called after walking a scope.
-post_symbol tcl_cmd: Names the commands called after walking a symbol.
tcl_cmd: Names the commands called for each symbol.
object-id
The ID of a scope.
other-args
Arguments required by the get subcommand.
Description:
The TV::scope command lets you examine and set a scope's properties and states.
You'll find many examples of this command being used in "Creating Vector Transformations".