.- help for ^s_no^ (STB-29: ip11) .- Display or drop objects named according to the S_# convention ------------------------------------------------------------- ^s_no^ [^,^ ^drop^ ^g^ap^(^gcount^)^ ^h^igh^(^hcount^)^ ^n^umeric] Description ----------- Conventionally, Stata programs use objects (macros, scalars, or matrices) with names of the form S_1, S_2, etc., to make results available to the user or to other programs. Especially when writing Stata programs, it may be helpful to display or to erase such objects while avoiding other members of the same class (e.g., global macros with names other than S_#). ^s_no^ provides this capability. By default, ^s_no^ displays the contents of the S_# macros, much like the command @disp_s@; the display starts at object S_1 and continues while consecutively nam- ed objects exist, i.e., until a gap is found. The option ^numeric^ produces a similar display for S_# scalars and matrices. Options ------- ^drop^ causes s_no to (silently) remove consecutively named S_# objects (macros, by default) from memory. With the ^numeric^ option, S_# scalars and matrices are dropped, which is similar in effect to the undocumented @zap_s@ command. ^gap(gcount)^ controls the gap size that causes termination; the default value is 1. Thus, if macros S_1, S_2, S_3, S_5, and S_9 (and no others) exist, ^s_no^ will by default display only the contents of S_1, S_2, and S_3. With the option gap(2), s_no requires a gap of size 2 to terminate, so that the con- tents of S_1, S_2, S_3, and S_5 will be displayed; setting gap(4) would in- clude S_9 in the display. A large value of ^gcount^ will generally find all S_# objects in the class being examined. (But see option ^high^.) ^high(hcount)^ sets an upper limit on eligible S_# objects; hi(15) restricts at- tention to the objects S_1, S_2, ..., S_15. ^numeric^ causes s_no to operate on numerical objects (scalars and matrices) with names of the form S_#, rather than on S_# macros. Examples -------- . ^s_no^ (display S_# macros, stop when the first such macro does not exist) . ^s_no, hi(12)^ (display S_# macros in the range S_1 ... S_12, stop if any fails to exist) . ^s_no, num gap(10)^ (display S_# scalars and matrices until 10 consecutive S_# matrices or sca- lars fail to exist) . ^s_no, num drop g(20) h(20)^ (drop all existent S_# scalars and matrices in the range S_1 ... S_20) Author ------ John R. Gleason Syracuse University 73241.717@@compuserve.com Also see -------- STB: STB-29 ip11 Manual: [2] _result, [4] program_fragments, [6a] scalar On-line: help for @disp_s@, @zap_s@