__whos_line_format__
- :
val =__whos_line_format__()¶ - :
old_val =__whos_line_format__(new_val)¶ - :
old_val =__whos_line_format__(new_val, "local")¶ Query or change the template that
whosuses to lay out each line of its variable listing.With no argument the current template is returned; supplying new_val installs a new one and returns the previous value.
A template is made of literal text interspersed with field specifications. Each field has the form
%[modifier]<command>[:width[:left-min[:balance]]];
and is closed by a semicolon. The
commandletter chooses which property of a variable the field prints:%aA fixed row of attribute flags, one character per property:
cwhen the value is complex,swhen it is sparse,fwhen it is a formal parameter,gwhen it is global, andpwhen it is persistent. An inactive flag shows as a blank.%bThe number of bytes the variable occupies.
%cThe class name of the variable.
%eThe number of elements the variable holds.
%nThe variable name.
%sThe size, that is, the dimensions of the variable.
%tThe type name of the variable.
The optional leading
modifierselects how the text sits in the field:lAlign to the left.
rAlign to the right (the default).
cCenter within a column; meaningful only for the
%scommand.
widthis the least number of columns the field may use. There is no upper bound: a field that needs more room grows to fit.left-minandbalanceapply only to the column-aligned form of%s.balancenames the column, counted from 0 at the left edge, that is lined up across successive entries, andleft-minis the smallest number of columns held to the left of that balance point.The template active by default is:
" %la:5; %ln:6; %cs:16:6:1; %rb:12; %lc:-1;\n"
Used with the
"local"keyword inside a function, the template is changed only for that function and the routines it calls, and the earlier value is restored when the function returns.