Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Bump version to 0.78 |
---|---|
Timelines: | family | ancestors | trunk |
Files: | files | file ages | folders |
SHA1: | 775c8a2b4df936bfb8e088e3fbd9820d |
User & Date: | steveb@workware.net.au 2018-06-30 23:57:55 |
Context
2018-06-30
| ||
23:57 | Bump version to 0.78 Leaf check-in: 775c8a2b4d user: steveb@workware.net.au tags: trunk | |
07:24 |
oo: Fix 'methods' for superclasses
Methods inherited from a base class are created with alias, so they are not returned by 'info procs'. Need to use 'info commands' instead. check-in: 644e0639b5 user: steveb@workware.net.au tags: trunk | |
Changes
Changes to Tcl_shipped.html.
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 ... 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 ... 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 ... 873 874 875 876 877 878 879 880 881 882 883 884 885 886 .... 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 .... 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 .... 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 .... 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 .... 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 .... 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 .... 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 .... 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 .... 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 .... 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 .... 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 .... 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 .... 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 .... 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 .... 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 .... 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 |
<body class="manpage"> <div id="header"> <h1> Jim Tcl(n) Manual Page </h1> <h2>NAME</h2> <div class="sectionbody"> <p>Jim Tcl v0.77 - reference manual for the Jim Tcl scripting language </p> </div> </div> <div id="content"> <div class="sect1"> <h2 id="_synopsis">SYNOPSIS</h2> ................................................................................ <div class="literalblock"> <div class="content"> <pre><code>cc <source> -ljim</code></pre> </div></div> <div class="paragraph"><p>or</p></div> <div class="literalblock"> <div class="content"> <pre><code>jimsh [<scriptfile>] jimsh -e '<immediate-script>' jimsh --version</code></pre> </div></div> <div class="ulist"><div class="title">Quick Index</div><ul> <li> <p> <a href="#CommandIndex">Command Reference</a> </p> </li> ................................................................................ <li> <p> <a href="#_env"><strong><code>env</code></strong></a> command to access environment variables </p> </li> <li> <p> Operating system features: <a href="#cmd_1"><strong><code>os.fork</code></strong></a>, <a href="#cmd_1"><strong><code>os.wait</code></strong></a>, <a href="#cmd_1"><strong><code>os.uptime</code></strong></a>, <a href="#_signal"><strong><code>signal</code></strong></a>, <a href="#_alarm"><strong><code>alarm</code></strong></a>, <a href="#_sleep"><strong><code>sleep</code></strong></a> </p> </li> <li> <p> Much better error reporting. <a href="#_info"><strong><code>info</code></strong></a> <code>stacktrace</code> as a replacement for <em>$errorInfo</em>, <em>$errorCode</em> </p> </li> ................................................................................ </li> </ol></div> </div> </div> <div class="sect1"> <h2 id="_recent_changes">RECENT CHANGES</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_changes_between_0_76_and_0_77">Changes between 0.76 and 0.77</h3> <div class="olist arabic"><ol class="arabic"> <li> <p> Add support for <a href="#_aio"><strong><code>aio</code></strong></a> <code>sync</code> </p> ................................................................................ <div class="content"> <pre><code>jimsh</code></pre> </div></div> <div class="paragraph"><p>or to process the Tcl script in a file with:</p></div> <div class="literalblock"> <div class="content"> <pre><code>jimsh filename</code></pre> </div></div> <div class="paragraph"><p>It may also be invoked to execute an immediate script with:</p></div> <div class="literalblock"> <div class="content"> <pre><code>jimsh -e "script"</code></pre> </div></div> <div class="sect2"> ................................................................................ <td align="left" valign="top"><p class="table"><a href="#_close"><strong><code>close</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_collect"><strong><code>collect</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_concat"><strong><code>concat</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_continue"><strong><code>continue</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_curry"><strong><code>curry</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_dict"><strong><code>dict</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_env"><strong><code>env</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_eof"><strong><code>eof</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_error"><strong><code>error</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_eval"><strong><code>eval</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#cmd_2"><strong><code>eventloop</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_exec"><strong><code>exec</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_exists"><strong><code>exists</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_exit"><strong><code>exit</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_expr"><strong><code>expr</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_fconfigure"><strong><code>fconfigure</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_file"><strong><code>file</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_finalize"><strong><code>finalize</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_flush"><strong><code>flush</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_for"><strong><code>for</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_foreach"><strong><code>foreach</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_format"><strong><code>format</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_getref"><strong><code>getref</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_gets"><strong><code>gets</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_glob"><strong><code>glob</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_global"><strong><code>global</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_history"><strong><code>history</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_if"><strong><code>if</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_incr"><strong><code>incr</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_info"><strong><code>info</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_interp"><strong><code>interp</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_join"><strong><code>join</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_kill"><strong><code>kill</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lambda"><strong><code>lambda</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_lappend"><strong><code>lappend</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lassign"><strong><code>lassign</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lindex"><strong><code>lindex</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_linsert"><strong><code>linsert</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_list"><strong><code>list</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_llength"><strong><code>llength</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lmap"><strong><code>lmap</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_load"><strong><code>load</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_local"><strong><code>local</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_loop"><strong><code>loop</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lrange"><strong><code>lrange</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lrepeat"><strong><code>lrepeat</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lreplace"><strong><code>lreplace</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lreverse"><strong><code>lreverse</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lsearch"><strong><code>lsearch</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lset"><strong><code>lset</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_lsort"><strong><code>lsort</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_namespace"><strong><code>namespace</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_4"><strong><code>oo</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_open"><strong><code>open</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_1"><strong><code>os.fork</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_1"><strong><code>os.gethostname</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_1"><strong><code>os.getids</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_1"><strong><code>os.uptime</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#cmd_1"><strong><code>os.wait</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_3"><strong><code>pack</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_3"><strong><code>pack</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_package"><strong><code>package</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_pid"><strong><code>pid</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_1"><strong><code>posix</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_proc"><strong><code>proc</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_puts"><strong><code>puts</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_pwd"><strong><code>pwd</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_rand"><strong><code>rand</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_range"><strong><code>range</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_read"><strong><code>read</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_ref"><strong><code>ref</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_regexp"><strong><code>regexp</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_regsub"><strong><code>regsub</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_rename"><strong><code>rename</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_return"><strong><code>return</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_scan"><strong><code>scan</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_seek"><strong><code>seek</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_set"><strong><code>set</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_setref"><strong><code>setref</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_signal"><strong><code>signal</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_sleep"><strong><code>sleep</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_socket"><strong><code>socket</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_source"><strong><code>source</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_split"><strong><code>split</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_stackdump"><strong><code>stackdump</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_stacktrace"><strong><code>stacktrace</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_string"><strong><code>string</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_subst"><strong><code>subst</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_4"><strong><code>super</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_switch"><strong><code>switch</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_syslog"><strong><code>syslog</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_tailcall"><strong><code>tailcall</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_tcl_prefix"><strong><code>tcl::prefix</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_tell"><strong><code>tell</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_throw"><strong><code>throw</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_time"><strong><code>time</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_tree"><strong><code>tree</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_try"><strong><code>try</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_unknown"><strong><code>unknown</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_3"><strong><code>unpack</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_unset"><strong><code>unset</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_upcall"><strong><code>upcall</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_2"><strong><code>update</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_uplevel"><strong><code>uplevel</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_upvar"><strong><code>upvar</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_2"><strong><code>vwait</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_while"><strong><code>while</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_zlib"><strong><code>zlib</code></strong></a></p></td> <td align="left" valign="top"><p class="table"></p></td> <td align="left" valign="top"><p class="table"></p></td> <td align="left" valign="top"><p class="table"></p></td> <td align="left" valign="top"><p class="table"></p></td> <td align="left" valign="top"><p class="table"></p></td> <td align="left" valign="top"><p class="table"></p></td> </tr> </tbody> </table> </div> ................................................................................ <div class="dlist"><dl> <dt class="hdlist1"> <code><strong>array exists</strong> <em>arrayName</em></code> </dt> <dd> <p> Returns 1 if arrayName is an array variable, 0 if there is no variable by that name. This command is essentially identical to <a href="#_info"><strong><code>info</code></strong></a> <code>exists</code> </p> </dd> <dt class="hdlist1"> <code><strong>array get</strong> <em>arrayName ?pattern?</em></code> </dt> <dd> <p> ................................................................................ <div class="paragraph"><p>If <code>-unique</code> is specified, then only the last set of duplicate elements found in the list will be retained. Note that duplicates are determined relative to the comparison used in the sort. Thus if <code>-index 0</code> is used, <code>{1 a}</code> and <code>{1 b}</code> would be considered duplicates and only the second element, <code>{1 b}</code>, would be retained.</p></div> <div class="paragraph"><p>If <code>-index <em>listindex</em></code> is specified, each element of the list is treated as a list and the given index is extracted from the list for comparison. The list index may be any valid list index, such as <code>1</code>, <code>end</code> or <code>end-2</code>.</p></div> </div> <div class="sect2"> <h3 id="_open">open</h3> <div class="paragraph"><p><code><strong>open</strong> <em>fileName ?access?</em></code></p></div> <div class="paragraph"><p><code><strong>open</strong> <em>|command-pipeline ?access?</em></code></p></div> <div class="paragraph"><p>Opens a file and returns an identifier that may be used in future invocations of commands like <a href="#_read"><strong><code>read</code></strong></a>, <a href="#_puts"><strong><code>puts</code></strong></a>, and <a href="#_close"><strong><code>close</code></strong></a>. ................................................................................ <div class="paragraph"><p>In the first form, if no <code><em>fileId</em></code> is specified then it defaults to <code>stdout</code>. <a href="#_puts"><strong><code>puts</code></strong></a> normally outputs a newline character after <code><em>string</em></code>, but this feature may be suppressed by specifying the <code>-nonewline</code> switch.</p></div> <div class="paragraph"><p>Output to files is buffered internally by Tcl; the <a href="#_flush"><strong><code>flush</code></strong></a> command may be used to force buffered characters to be output.</p></div> </div> <div class="sect2"> <h3 id="_pwd">pwd</h3> <div class="paragraph"><p><code><strong>pwd</strong></code></p></div> <div class="paragraph"><p>Returns the path name of the current working directory.</p></div> </div> <div class="sect2"> <h3 id="_rand">rand</h3> ................................................................................ ... handle configuration/reconfiguration ... while {[signal check -clear SIGHUP] eq ""} { ... do processing .. } # Received SIGHUP, so reconfigure }</code></pre> </div></div> </div> <div class="sect2"> <h3 id="_sleep">sleep</h3> <div class="paragraph"><p><code><strong>sleep</strong> <em>seconds</em></code></p></div> <div class="paragraph"><p>Pauses for the given number of seconds, which may be a floating point value less than one to sleep for less than a second, or an integer to sleep for one or more seconds.</p></div> ................................................................................ </div></div> <div class="paragraph"><p><em>add2</em> is invoked with an argument giving the name of a variable, and it adds two to the value of that variable. Although <em>add2</em> could have been implemented using <a href="#_uplevel"><strong><code>uplevel</code></strong></a> instead of <a href="#_upvar"><strong><code>upvar</code></strong></a>, <a href="#_upvar"><strong><code>upvar</code></strong></a> makes it simpler for <em>add2</em> to access the variable in the caller’s procedure frame.</p></div> </div> <div class="sect2"> <h3 id="_while">while</h3> <div class="paragraph"><p><code><strong>while</strong> <em>test body</em></code></p></div> <div class="paragraph"><p>The <code><em>while</em></code> command evaluates <code><em>test</em></code> as an expression (in the same way that <a href="#_expr"><strong><code>expr</code></strong></a> evaluates its argument). The value of the expression must be numeric; if it is non-zero then <code><em>body</em></code> is executed by passing it to the Tcl interpreter.</p></div> ................................................................................ </div> <div class="sect1"> <h2 id="_optional_extensions">OPTIONAL-EXTENSIONS</h2> <div class="sectionbody"> <div class="paragraph"><p>The following extensions may or may not be available depending upon what options were selected when Jim Tcl was built.</p></div> <div class="sect2"> <h3 id="cmd_1">posix: os.fork, os.wait, os.gethostname, os.getids, os.uptime</h3> <div class="dlist"><dl> <dt class="hdlist1"> <code><strong>os.fork</strong></code> </dt> <dd> <p> Invokes <em>fork(2)</em> and returns the result. </p> </dd> <dt class="hdlist1"> <code><strong>os.wait -nohang</strong> <em>pid</em></code> </dt> <dd> <p> Invokes waitpid(2), with WNOHANG if <code>-nohang</code> is specified. Returns a list of 3 elements. </p> <div class="literalblock"> <div class="content"> <pre><code>{0 none 0} if -nohang is specified, and the process is still alive.</code></pre> </div></div> <div class="literalblock"> <div class="content"> <pre><code>{-1 error <error-description>} if the process does not exist or has already been waited for.</code></pre> </div></div> <div class="literalblock"> <div class="content"> <pre><code>{<pid> exit <exit-status>} if the process exited normally.</code></pre> </div></div> <div class="literalblock"> <div class="content"> <pre><code>{<pid> signal <signal-number>} if the process terminated on a signal.</code></pre> </div></div> <div class="literalblock"> <div class="content"> <pre><code>{<pid> other 0} otherwise (core dump, stopped, continued, etc.)</code></pre> </div></div> </dd> <dt class="hdlist1"> <code><strong>os.gethostname</strong></code> </dt> <dd> <p> Invokes <em>gethostname(3)</em> and returns the result. </p> ................................................................................ <dd> <p> Sends the string, <code><em>str</em></code>, to the given address via the socket using sendto(2). This is intended for udp/dgram sockets and may give an error or behave in unintended ways for other handle types. Returns the number of bytes written. </p> </dd> <dt class="hdlist1"> <code>$handle <strong>sync</strong></code> </dt> <dd> <p> Flush the stream, then fsync(2) to commit any changes to storage. ................................................................................ <dt class="hdlist1"> <code>$handle <strong>tell</strong></code> </dt> <dd> <p> Returns the current seek position </p> </dd> <dt class="hdlist1"> <code>$handle <strong>ssl</strong> <strong>?-server cert priv?</strong></code> </dt> <dd> <p> Initiates a SSL/TLS session and returns a new stream </p> </dd> <dt class="hdlist1"> <code>$handle <strong>unlock</strong></code> </dt> <dd> <p> ................................................................................ </p> </dd> <dt class="hdlist1"> <code><strong>socket pipe</strong></code> </dt> <dd> <p> A pipe. Note that unlike all other socket types, this command returns a list of two channels: {read write} </p> </dd> <dt class="hdlist1"> <code><strong>socket pair</strong></code> </dt> <dd> <p> A socketpair (see socketpair(2)). Like <a href="#_socket"><strong><code>socket</code></strong></a> <code>pipe</code>, this command returns a list of two channels: {s1 s2}. These channels are both readable and writable. </p> </dd> </dl></div> <div class="paragraph"><p>This command creates a socket connected (client) or bound (server) to the given address.</p></div> <div class="paragraph"><p>The returned value is channel and may generally be used with the various file I/O ................................................................................ Dumps the tree contents to stdout </p> </dd> </dl></div> </div> <div class="sect2"> <h3 id="_tcl_prefix">tcl::prefix</h3> <div class="paragraph"><p>The optional tclprefix extension provides the Tcl8.6-compatible <em>tcl::prefix</em> command (<a href="http://www.tcl.tk/man/tcl8.6/TclCmd/prefix.htm">http://www.tcl.tk/man/tcl8.6/TclCmd/prefix.htm</a>) for matching strings against a table of possible values (typically commands or options).</p></div> <div class="dlist"><dl> <dt class="hdlist1"> <code><strong>tcl::prefix all</strong> <em>table string</em></code> </dt> <dd> ................................................................................ empty, no error is generated and an empty string is returned. Otherwise the options are used as return options when generating the error message. The default corresponds to setting <code>-level 0</code>. </p> </li> </ul></div> </dd> </dl></div> </div> <div class="sect2"> <h3 id="_history">history</h3> <div class="paragraph"><p>The optional history extension provides script access to the command line editing and history support available in <em>jimsh</em>. See <em>examples/jtclsh.tcl</em> for an example. ................................................................................ </dt> <dd> <p> Displays the given prompt and allows a line to be entered. Similarly to <a href="#_gets"><strong><code>gets</code></strong></a>, if <code><em>varname</em></code> is given, it receives the line and the length of the line is returned, or -1 on EOF. If <code><em>varname</em></code> is not given, the line is returned directly. </p> </dd> <dt class="hdlist1"> <code><strong>history add</strong> <em>line</em></code> </dt> <dd> <p> Adds the given line to the history buffer. ................................................................................ <dt class="hdlist1"> <code><strong>jim::argv0</strong></code> </dt> <dd> <p> The value of argv[0] when jimsh was invoked. </p> </dd> </dl></div> </div> </div> <div class="sect1"> <h2 id="_changes_in_previous_releases">CHANGES IN PREVIOUS RELEASES</h2> <div class="sectionbody"> ................................................................................ official policies, either expressed or implied, of the Jim Tcl Project.</code></pre> </div></div> </div> </div> </div> <div id="footnotes"><hr /></div> <div id="footer"> <div id="footer-text"> Last updated 2016-08-29 16:18:20 AEST </div> </div> </body> </html> |
| | | > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < > < > < > < > < > < > < | > < > < > < > < > > < < > > < < | | | | | | < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | < | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < < < |
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 ... 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 ... 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 ... 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 .... 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 .... 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 .... 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 .... 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 .... 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 .... 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 .... 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 .... 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 .... 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 .... 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 .... 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 .... 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 .... 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 .... 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 .... 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 .... 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 |
<body class="manpage"> <div id="header"> <h1> Jim Tcl(n) Manual Page </h1> <h2>NAME</h2> <div class="sectionbody"> <p>Jim Tcl v0.78 - reference manual for the Jim Tcl scripting language </p> </div> </div> <div id="content"> <div class="sect1"> <h2 id="_synopsis">SYNOPSIS</h2> ................................................................................ <div class="literalblock"> <div class="content"> <pre><code>cc <source> -ljim</code></pre> </div></div> <div class="paragraph"><p>or</p></div> <div class="literalblock"> <div class="content"> <pre><code>jimsh [<scriptfile>|-] jimsh -e '<immediate-script>' jimsh --version jimsh --help</code></pre> </div></div> <div class="ulist"><div class="title">Quick Index</div><ul> <li> <p> <a href="#CommandIndex">Command Reference</a> </p> </li> ................................................................................ <li> <p> <a href="#_env"><strong><code>env</code></strong></a> command to access environment variables </p> </li> <li> <p> Operating system features: <a href="#cmd_1"><strong><code>os.fork</code></strong></a>, <a href="#cmd_1"><strong><code>os.uptime</code></strong></a>, <a href="#_wait"><strong><code>wait</code></strong></a>, <a href="#_signal"><strong><code>signal</code></strong></a>, <a href="#_alarm"><strong><code>alarm</code></strong></a>, <a href="#_sleep"><strong><code>sleep</code></strong></a> </p> </li> <li> <p> Much better error reporting. <a href="#_info"><strong><code>info</code></strong></a> <code>stacktrace</code> as a replacement for <em>$errorInfo</em>, <em>$errorCode</em> </p> </li> ................................................................................ </li> </ol></div> </div> </div> <div class="sect1"> <h2 id="_recent_changes">RECENT CHANGES</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_changes_between_0_77_and_0_78">Changes between 0.77 and 0.78</h3> <div class="olist arabic"><ol class="arabic"> <li> <p> Add serial/tty support with <a href="#_aio"><strong><code>aio</code></strong></a> <code>tty</code> </p> </li> <li> <p> Add support for <em>jimsh -</em> </p> </li> <li> <p> Add hidden <em>-commands</em> option to many commands </p> </li> <li> <p> Add scriptable autocompletion support in interactive mode with <a href="#_tcl_autocomplete"><strong><code>tcl::autocomplete</code></strong></a> </p> </li> <li> <p> Add <a href="#_aio"><strong><code>aio</code></strong></a> <code>sockopt</code> </p> </li> <li> <p> Add scriptable autocompletion support with <a href="#_history"><strong><code>history</code></strong></a> <code>completion</code> </p> </li> <li> <p> Add support for <a href="#_tree"><strong><code>tree</code></strong></a> <code>delete</code> </p> </li> <li> <p> Add support for <a href="#_defer"><strong><code>defer</code></strong></a> and <em>$jim::defer</em> </p> </li> <li> <p> Renamed <code>os.wait</code> to <a href="#_wait"><strong><code>wait</code></strong></a>, now more Tcl-compatible and compatible with <a href="#_exec"><strong><code>exec</code></strong></a> <code>... &</code> </p> </li> <li> <p> <a href="#_pipe"><strong><code>pipe</code></strong></a> is now a synonym for <a href="#_socket"><strong><code>socket</code></strong></a> <code>pipe</code> </p> </li> <li> <p> Closing a pipe open with <a href="#_open"><strong><code>open</code></strong></a> <code>|...</code> now returns Tcl-like status </p> </li> <li> <p> It is now possible to used <a href="#_exec"><strong><code>exec</code></strong></a> redirection with a pipe opened with <a href="#_open"><strong><code>open</code></strong></a> <code>|...</code> </p> </li> <li> <p> Interactive line editing now supports multiline mode if $::history::multiline is set </p> </li> </ol></div> </div> <div class="sect2"> <h3 id="_changes_between_0_76_and_0_77">Changes between 0.76 and 0.77</h3> <div class="olist arabic"><ol class="arabic"> <li> <p> Add support for <a href="#_aio"><strong><code>aio</code></strong></a> <code>sync</code> </p> ................................................................................ <div class="content"> <pre><code>jimsh</code></pre> </div></div> <div class="paragraph"><p>or to process the Tcl script in a file with:</p></div> <div class="literalblock"> <div class="content"> <pre><code>jimsh filename</code></pre> </div></div> <div class="paragraph"><p>or to process the Tcl script from standard input:</p></div> <div class="literalblock"> <div class="content"> <pre><code>jimsh -</code></pre> </div></div> <div class="paragraph"><p>It may also be invoked to execute an immediate script with:</p></div> <div class="literalblock"> <div class="content"> <pre><code>jimsh -e "script"</code></pre> </div></div> <div class="sect2"> ................................................................................ <td align="left" valign="top"><p class="table"><a href="#_close"><strong><code>close</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_collect"><strong><code>collect</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_concat"><strong><code>concat</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_continue"><strong><code>continue</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_curry"><strong><code>curry</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_defer"><strong><code>defer</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_dict"><strong><code>dict</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_env"><strong><code>env</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_eof"><strong><code>eof</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_error"><strong><code>error</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_eval"><strong><code>eval</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_2"><strong><code>eventloop</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_exec"><strong><code>exec</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_exists"><strong><code>exists</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_exit"><strong><code>exit</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_expr"><strong><code>expr</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_fconfigure"><strong><code>fconfigure</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_file"><strong><code>file</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_finalize"><strong><code>finalize</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_flush"><strong><code>flush</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_for"><strong><code>for</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_foreach"><strong><code>foreach</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_format"><strong><code>format</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_getref"><strong><code>getref</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_gets"><strong><code>gets</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_glob"><strong><code>glob</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_global"><strong><code>global</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_history"><strong><code>history</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_if"><strong><code>if</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_incr"><strong><code>incr</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_info"><strong><code>info</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_interp"><strong><code>interp</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_join"><strong><code>join</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_kill"><strong><code>kill</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_lambda"><strong><code>lambda</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lappend"><strong><code>lappend</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lassign"><strong><code>lassign</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lindex"><strong><code>lindex</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_linsert"><strong><code>linsert</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_list"><strong><code>list</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_llength"><strong><code>llength</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lmap"><strong><code>lmap</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_load"><strong><code>load</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_local"><strong><code>local</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_loop"><strong><code>loop</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lrange"><strong><code>lrange</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lrepeat"><strong><code>lrepeat</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lreplace"><strong><code>lreplace</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lreverse"><strong><code>lreverse</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lsearch"><strong><code>lsearch</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_lset"><strong><code>lset</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_lsort"><strong><code>lsort</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_namespace"><strong><code>namespace</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_4"><strong><code>oo</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_open"><strong><code>open</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_1"><strong><code>os.fork</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_1"><strong><code>os.gethostname</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_1"><strong><code>os.getids</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#cmd_1"><strong><code>os.uptime</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_3"><strong><code>pack</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_3"><strong><code>pack</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_package"><strong><code>package</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_pid"><strong><code>pid</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_pipe"><strong><code>pipe</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_1"><strong><code>posix</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_proc"><strong><code>proc</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_puts"><strong><code>puts</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_pwd"><strong><code>pwd</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_rand"><strong><code>rand</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_range"><strong><code>range</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_read"><strong><code>read</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_ref"><strong><code>ref</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_regexp"><strong><code>regexp</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_regsub"><strong><code>regsub</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_rename"><strong><code>rename</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_return"><strong><code>return</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_scan"><strong><code>scan</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_seek"><strong><code>seek</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_set"><strong><code>set</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_setref"><strong><code>setref</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_signal"><strong><code>signal</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_sleep"><strong><code>sleep</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_socket"><strong><code>socket</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_source"><strong><code>source</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_split"><strong><code>split</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_stackdump"><strong><code>stackdump</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_stacktrace"><strong><code>stacktrace</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_string"><strong><code>string</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_subst"><strong><code>subst</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_4"><strong><code>super</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_switch"><strong><code>switch</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_syslog"><strong><code>syslog</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_tailcall"><strong><code>tailcall</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_tcl_autocomplete"><strong><code>tcl::autocomplete</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_tcl_prefix"><strong><code>tcl::prefix</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_tell"><strong><code>tell</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_throw"><strong><code>throw</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_time"><strong><code>time</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_tree"><strong><code>tree</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_try"><strong><code>try</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_unknown"><strong><code>unknown</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_3"><strong><code>unpack</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_unset"><strong><code>unset</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_upcall"><strong><code>upcall</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_2"><strong><code>update</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_uplevel"><strong><code>uplevel</code></strong></a></p></td> </tr> <tr> <td align="left" valign="top"><p class="table"><a href="#_upvar"><strong><code>upvar</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#cmd_2"><strong><code>vwait</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_wait"><strong><code>wait</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_while"><strong><code>while</code></strong></a></p></td> <td align="left" valign="top"><p class="table"><a href="#_zlib"><strong><code>zlib</code></strong></a></p></td> <td align="left" valign="top"><p class="table"></p></td> <td align="left" valign="top"><p class="table"></p></td> <td align="left" valign="top"><p class="table"></p></td> </tr> </tbody> </table> </div> ................................................................................ <div class="dlist"><dl> <dt class="hdlist1"> <code><strong>array exists</strong> <em>arrayName</em></code> </dt> <dd> <p> Returns 1 if arrayName is an array variable, 0 if there is no variable by that name. </p> </dd> <dt class="hdlist1"> <code><strong>array get</strong> <em>arrayName ?pattern?</em></code> </dt> <dd> <p> ................................................................................ <div class="paragraph"><p>If <code>-unique</code> is specified, then only the last set of duplicate elements found in the list will be retained. Note that duplicates are determined relative to the comparison used in the sort. Thus if <code>-index 0</code> is used, <code>{1 a}</code> and <code>{1 b}</code> would be considered duplicates and only the second element, <code>{1 b}</code>, would be retained.</p></div> <div class="paragraph"><p>If <code>-index <em>listindex</em></code> is specified, each element of the list is treated as a list and the given index is extracted from the list for comparison. The list index may be any valid list index, such as <code>1</code>, <code>end</code> or <code>end-2</code>.</p></div> </div> <div class="sect2"> <h3 id="_defer">defer</h3> <div class="paragraph"><p><code><strong>defer</strong> <em>script</em></code></p></div> <div class="paragraph"><p>This command is a simple helper command to add a script to the <em><code>$jim::defer</code></em> variable that will run when the current proc or interpreter exits. For example:</p></div> <div class="literalblock"> <div class="content"> <pre><code>jim> proc a {} { defer {puts "Leaving a"}; puts "Exit" } jim> a Exit Leaving a</code></pre> </div></div> <div class="paragraph"><p>If the <em><code>$jim::defer</code></em> variable exists, it is treated as a list of scripts to run when the proc or interpreter exits.</p></div> </div> <div class="sect2"> <h3 id="_open">open</h3> <div class="paragraph"><p><code><strong>open</strong> <em>fileName ?access?</em></code></p></div> <div class="paragraph"><p><code><strong>open</strong> <em>|command-pipeline ?access?</em></code></p></div> <div class="paragraph"><p>Opens a file and returns an identifier that may be used in future invocations of commands like <a href="#_read"><strong><code>read</code></strong></a>, <a href="#_puts"><strong><code>puts</code></strong></a>, and <a href="#_close"><strong><code>close</code></strong></a>. ................................................................................ <div class="paragraph"><p>In the first form, if no <code><em>fileId</em></code> is specified then it defaults to <code>stdout</code>. <a href="#_puts"><strong><code>puts</code></strong></a> normally outputs a newline character after <code><em>string</em></code>, but this feature may be suppressed by specifying the <code>-nonewline</code> switch.</p></div> <div class="paragraph"><p>Output to files is buffered internally by Tcl; the <a href="#_flush"><strong><code>flush</code></strong></a> command may be used to force buffered characters to be output.</p></div> </div> <div class="sect2"> <h3 id="_pipe">pipe</h3> <div class="paragraph"><p>Creates a pair of <a href="#_aio"><strong><code>aio</code></strong></a> channels and returns the handles as a list: <code>{read write}</code></p></div> </div> <div class="sect2"> <h3 id="_pwd">pwd</h3> <div class="paragraph"><p><code><strong>pwd</strong></code></p></div> <div class="paragraph"><p>Returns the path name of the current working directory.</p></div> </div> <div class="sect2"> <h3 id="_rand">rand</h3> ................................................................................ ... handle configuration/reconfiguration ... while {[signal check -clear SIGHUP] eq ""} { ... do processing .. } # Received SIGHUP, so reconfigure }</code></pre> </div></div> <div class="paragraph"><p>Note: signal handling is currently not supported in child interpreters. In these interpreters, the signal command does not exist.</p></div> </div> <div class="sect2"> <h3 id="_sleep">sleep</h3> <div class="paragraph"><p><code><strong>sleep</strong> <em>seconds</em></code></p></div> <div class="paragraph"><p>Pauses for the given number of seconds, which may be a floating point value less than one to sleep for less than a second, or an integer to sleep for one or more seconds.</p></div> ................................................................................ </div></div> <div class="paragraph"><p><em>add2</em> is invoked with an argument giving the name of a variable, and it adds two to the value of that variable. Although <em>add2</em> could have been implemented using <a href="#_uplevel"><strong><code>uplevel</code></strong></a> instead of <a href="#_upvar"><strong><code>upvar</code></strong></a>, <a href="#_upvar"><strong><code>upvar</code></strong></a> makes it simpler for <em>add2</em> to access the variable in the caller’s procedure frame.</p></div> </div> <div class="sect2"> <h3 id="_wait">wait</h3> <div class="paragraph"><p><code><strong>wait</strong></code></p></div> <div class="paragraph"><p><code><strong>wait -nohang</strong> <em>pid</em></code></p></div> <div class="paragraph"><p>With no arguments, cleans up any processes started by <a href="#_exec"><strong><code>exec</code></strong></a> <code>... &</code> that have completed (reaps zombie processes).</p></div> <div class="paragraph"><p>With one or two arguments, waits for a process by id, either returned by <a href="#_exec"><strong><code>exec</code></strong></a> <code>... &</code> or by <a href="#cmd_1"><strong><code>os.fork</code></strong></a> (if supported).</p></div> <div class="paragraph"><p>Waits for the process to complete, unless <code>-nohang</code> is specified, in which case returns immediately if the process is still running.</p></div> <div class="paragraph"><p>Returns a list of 3 elements.</p></div> <div class="paragraph"><p><code>{NONE x x}</code> if the process does not exist or has already been waited for, or if -nohang is specified, and the process is still alive.</p></div> <div class="paragraph"><p><code>{CHILDSTATUS <pid> <exit-status>}</code> if the process exited normally.</p></div> <div class="paragraph"><p><code>{CHILDKILLED <pid> <signal>}</code> if the process terminated on a signal.</p></div> <div class="paragraph"><p><code>{CHILDSUSP <pid> none}</code> if the process terminated for some other reason.</p></div> <div class="paragraph"><p>Note that on platforms supporting waitpid(2), <code>pid</code> can also be given special values such as 0 or -1. See waitpid(2) for more detail.</p></div> </div> <div class="sect2"> <h3 id="_while">while</h3> <div class="paragraph"><p><code><strong>while</strong> <em>test body</em></code></p></div> <div class="paragraph"><p>The <code><em>while</em></code> command evaluates <code><em>test</em></code> as an expression (in the same way that <a href="#_expr"><strong><code>expr</code></strong></a> evaluates its argument). The value of the expression must be numeric; if it is non-zero then <code><em>body</em></code> is executed by passing it to the Tcl interpreter.</p></div> ................................................................................ </div> <div class="sect1"> <h2 id="_optional_extensions">OPTIONAL-EXTENSIONS</h2> <div class="sectionbody"> <div class="paragraph"><p>The following extensions may or may not be available depending upon what options were selected when Jim Tcl was built.</p></div> <div class="sect2"> <h3 id="cmd_1">posix: os.fork, os.gethostname, os.getids, os.uptime</h3> <div class="dlist"><dl> <dt class="hdlist1"> <code><strong>os.fork</strong></code> </dt> <dd> <p> Invokes <em>fork(2)</em> and returns the result. </p> </dd> <dt class="hdlist1"> <code><strong>os.gethostname</strong></code> </dt> <dd> <p> Invokes <em>gethostname(3)</em> and returns the result. </p> ................................................................................ <dd> <p> Sends the string, <code><em>str</em></code>, to the given address via the socket using sendto(2). This is intended for udp/dgram sockets and may give an error or behave in unintended ways for other handle types. Returns the number of bytes written. </p> </dd> <dt class="hdlist1"> <code>$handle <strong>sockopt</strong> <em>?name value?</em></code> </dt> <dd> <p> With no arguments, returns a dictionary of socket options currently set for the handle (will be empty for a non-socket). With <code><em>name</em></code> and <code><em>value</em></code>, sets the socket option to the given value. Currently supports the following boolean socket options: <code>broadcast, debug, keepalive, nosigpipe, oobinline, tcp_nodelay</code>, and the following integer socket options: <code>sndbuf, rcvbuf</code> </p> </dd> <dt class="hdlist1"> <code>$handle <strong>sync</strong></code> </dt> <dd> <p> Flush the stream, then fsync(2) to commit any changes to storage. ................................................................................ <dt class="hdlist1"> <code>$handle <strong>tell</strong></code> </dt> <dd> <p> Returns the current seek position </p> </dd> <dt class="hdlist1"> <code>$handle <strong>tty</strong> ?settings?</code> </dt> <dd> <p> If no arguments are given, returns a dictionary containing the tty settings for the stream. If arguments are given, they must either be a dictionary, or <code>setting value ...</code> Abbrevations are supported for both settings and values, so the following is acceptable: <code>$f tty parity e input c out raw</code>. Only available on platforms that support termios(3). Supported settings are: </p> <div class="dlist"><dl> <dt class="hdlist1"> <code><strong>baud</strong> <em>rate</em></code> </dt> <dd> <p> Baud rate. e.g. 115200 </p> </dd> <dt class="hdlist1"> <code><strong>data 5|6|7|8</strong></code> </dt> <dd> <p> Number of data bits </p> </dd> <dt class="hdlist1"> <code><strong>stop 1|2</strong></code> </dt> <dd> <p> Number of stop bits </p> </dd> <dt class="hdlist1"> <code><strong>parity even|odd|none</strong></code> </dt> <dd> <p> Parity setting </p> </dd> <dt class="hdlist1"> <code><strong>handshake xonxoff|rtscts|none</strong></code> </dt> <dd> <p> Handshaking type </p> </dd> <dt class="hdlist1"> <code><strong>input raw|cooked</strong></code> </dt> <dd> <p> Input character processing. In raw mode, the usual key sequences such as ^C do not generate signals. </p> </dd> <dt class="hdlist1"> <code><strong>output raw|cooked</strong></code> </dt> <dd> <p> Output character processing. Typically CR → CRNL is disabled in raw mode. </p> </dd> <dt class="hdlist1"> <code><strong>vmin</strong> <em>numchars</em></code> </dt> <dd> <p> Minimum number of characters to read. </p> </dd> <dt class="hdlist1"> <code><strong>vtime</strong> <em>time</em></code> </dt> <dd> <p> Timeout for noncanonical read (units of 0.1 seconds) </p> </dd> </dl></div> </dd> <dt class="hdlist1"> <code>$handle <strong>ssl</strong> <strong>?-server cert priv?</strong></code> </dt> <dd> <p> Upgrades the stream to a SSL/TLS session and returns the handle. </p> </dd> <dt class="hdlist1"> <code>$handle <strong>unlock</strong></code> </dt> <dd> <p> ................................................................................ </p> </dd> <dt class="hdlist1"> <code><strong>socket pipe</strong></code> </dt> <dd> <p> A synonym for <a href="#_pipe"><strong><code>pipe</code></strong></a> </p> </dd> <dt class="hdlist1"> <code><strong>socket pair</strong></code> </dt> <dd> <p> A socketpair (see socketpair(2)). Like <a href="#_pipe"><strong><code>pipe</code></strong></a>, this command returns a list of two channels: {s1 s2}. These channels are both readable and writable. </p> </dd> </dl></div> <div class="paragraph"><p>This command creates a socket connected (client) or bound (server) to the given address.</p></div> <div class="paragraph"><p>The returned value is channel and may generally be used with the various file I/O ................................................................................ Dumps the tree contents to stdout </p> </dd> </dl></div> </div> <div class="sect2"> <h3 id="_tcl_prefix">tcl::prefix</h3> <div class="paragraph"><p>The optional tclprefix extension provides the Tcl8.6-compatible <a href="#_tcl_prefix"><strong><code>tcl::prefix</code></strong></a> command (<a href="http://www.tcl.tk/man/tcl8.6/TclCmd/prefix.htm">http://www.tcl.tk/man/tcl8.6/TclCmd/prefix.htm</a>) for matching strings against a table of possible values (typically commands or options).</p></div> <div class="dlist"><dl> <dt class="hdlist1"> <code><strong>tcl::prefix all</strong> <em>table string</em></code> </dt> <dd> ................................................................................ empty, no error is generated and an empty string is returned. Otherwise the options are used as return options when generating the error message. The default corresponds to setting <code>-level 0</code>. </p> </li> </ul></div> </dd> </dl></div> </div> <div class="sect2"> <h3 id="_tcl_autocomplete">tcl::autocomplete</h3> <div class="paragraph"><p>Scriptable command line completion is supported in the interactive shell, <em>jimsh</em>, through the <a href="#_tcl_autocomplete"><strong><code>tcl::autocomplete</code></strong></a> callback. A simple implementation is provided, however this may be replaced with a custom command instead if desired.</p></div> <div class="paragraph"><p>In the interactive shell, press <TAB> to activate command line completion.</p></div> <div class="dlist"><dl> <dt class="hdlist1"> <code><strong>tcl::autocomplete</strong> <em>commandline</em></code> </dt> <dd> <p> This command is called with the current command line when the user presses <TAB>. The command should return a list of all possible command lines that match the current command line. For example if <code><strong>pr</strong></code> is the current command line, the list <code><strong>{prefix proc}</strong></code> may be returned. </p> </dd> </dl></div> </div> <div class="sect2"> <h3 id="_history">history</h3> <div class="paragraph"><p>The optional history extension provides script access to the command line editing and history support available in <em>jimsh</em>. See <em>examples/jtclsh.tcl</em> for an example. ................................................................................ </dt> <dd> <p> Displays the given prompt and allows a line to be entered. Similarly to <a href="#_gets"><strong><code>gets</code></strong></a>, if <code><em>varname</em></code> is given, it receives the line and the length of the line is returned, or -1 on EOF. If <code><em>varname</em></code> is not given, the line is returned directly. </p> </dd> <dt class="hdlist1"> <code><strong>history completion</strong> <em>command</em></code> </dt> <dd> <p> Sets an autocompletion command (see <a href="#_tcl_autocomplete"><strong><code>tcl::autocomplete</code></strong></a>) that is active during <a href="#_history"><strong><code>history</code></strong></a> <code>getline</code>. If the command is empty, autocompletion is disabled. </p> </dd> <dt class="hdlist1"> <code><strong>history add</strong> <em>line</em></code> </dt> <dd> <p> Adds the given line to the history buffer. ................................................................................ <dt class="hdlist1"> <code><strong>jim::argv0</strong></code> </dt> <dd> <p> The value of argv[0] when jimsh was invoked. </p> </dd> </dl></div> <div class="paragraph"><p>The following variables have special meaning to Jim Tcl:</p></div> <div class="dlist"><dl> <dt class="hdlist1"> <code><strong>jim::defer</strong></code> </dt> <dd> <p> If this variable is set, it is considered to be a list of scripts to evaluate when the current proc exits (local variables), or the interpreter exits (global variable). See <a href="#_defer"><strong><code>defer</code></strong></a>. </p> </dd> <dt class="hdlist1"> <code><strong>history::multiline</strong></code> </dt> <dd> <p> If this variable is set to "1", interactive line editing operates in multiline mode. That is, long lines will wrap across multiple lines rather than scrolling within a single line. </p> </dd> </dl></div> </div> </div> <div class="sect1"> <h2 id="_changes_in_previous_releases">CHANGES IN PREVIOUS RELEASES</h2> <div class="sectionbody"> ................................................................................ official policies, either expressed or implied, of the Jim Tcl Project.</code></pre> </div></div> </div> </div> </div> <div id="footnotes"><hr /></div> <div id="footer"> </div> </body> </html> |
Changes to appveyor.yml.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
version: "0.77.0.{build}"
install:
- cmd: set MSYSTEM=MINGW32
- cmd: C:\msys64\usr\bin\bash -lc "pacman --sync --noconfirm make mingw-w64-i686-gcc"
build_script:
- cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; ./configure --full --with-ext='zlib win32' --disable-docs"
- cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; make"
test_script:
- cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; make test"
after_build:
- cmd: copy jimsh.exe jimsh_debug.exe
- cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; strip jimsh.exe; 7z a jimsh.zip jimsh.exe jimsh_debug.exe /c/msys64/mingw32/bin/{libgcc_s_dw2-1.dll,libwinpthread-1.dll,libeay32.dll,ssleay32.dll}"
artifacts:
- path: jimsh.zip
|
| |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
version: "0.78.0.{build}"
install:
- cmd: set MSYSTEM=MINGW32
- cmd: C:\msys64\usr\bin\bash -lc "pacman --sync --noconfirm make mingw-w64-i686-gcc"
build_script:
- cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; ./configure --full --with-ext='zlib win32' --disable-docs"
- cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; make"
test_script:
- cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; make test"
after_build:
- cmd: copy jimsh.exe jimsh_debug.exe
- cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; strip jimsh.exe; 7z a jimsh.zip jimsh.exe jimsh_debug.exe /c/msys64/mingw32/bin/{libgcc_s_dw2-1.dll,libwinpthread-1.dll,libeay32.dll,ssleay32.dll}"
artifacts:
- path: jimsh.zip
|
Changes to auto.def.
1 2 3 4 5 6 7 8 9 10 11 |
# vim:se syn=tcl:
#
define JIM_VERSION 77
options-defaults {
silent-rules 1
}
# Note: modules which support options *must* be included before 'options'
use cc cc-shared cc-db cc-lib pkg-config util
|
| |
1 2 3 4 5 6 7 8 9 10 11 |
# vim:se syn=tcl:
#
define JIM_VERSION 78
options-defaults {
silent-rules 1
}
# Note: modules which support options *must* be included before 'options'
use cc cc-shared cc-db cc-lib pkg-config util
|
Changes to jim_tcl.txt.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Jim Tcl(n)
==========
NAME
----
Jim Tcl v0.77 - reference manual for the Jim Tcl scripting language
SYNOPSIS
--------
cc <source> -ljim
or
|
| |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Jim Tcl(n)
==========
NAME
----
Jim Tcl v0.78 - reference manual for the Jim Tcl scripting language
SYNOPSIS
--------
cc <source> -ljim
or
|