<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Toni</id>
	<title>STX Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Toni"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php/Special:Contributions/Toni"/>
	<updated>2026-05-06T12:31:31Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/interp&amp;diff=10707</id>
		<title>Programmer Guide/Command Reference/EVAL/interp</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/interp&amp;diff=10707"/>
		<updated>2025-10-28T14:22:47Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
;Usage 1:&amp;lt;code&amp;gt;interp(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; {, &amp;lt;var&amp;gt;mv&amp;lt;/var&amp;gt;})&amp;lt;/code&amp;gt;&lt;br /&gt;
:Create an interpolated copy of the vector &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; with length &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;.&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;:vector to be interpolated, &amp;lt;var&amp;gt;x[i] = f(i)&amp;lt;/var&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;:length of the interpolated output vector; the interpolated vector can be shorter or longer than the original&lt;br /&gt;
:;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;:the type of interpolation to perform&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;0&#039;&#039;&#039;: linear interpolation&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;1&#039;&#039;&#039;: cubic spline interpolation&lt;br /&gt;
:;&amp;lt;var&amp;gt;mv&amp;lt;/var&amp;gt;:the value to use for &#039;&#039;missing values&#039;&#039;. If &#039;&#039;mv&#039;&#039; is given, then interpolation is stopped when &amp;lt;code&amp;gt;&#039;&#039;x&#039;&#039;[i] = &#039;&#039;mv&#039;&#039;&amp;lt;/code&amp;gt;. This means that the sections without missing values are individually interpolated. If &#039;&#039;mv&#039;&#039; is not supplied, the whole vector &#039;&#039;x&#039;&#039; is interpolated.&lt;br /&gt;
::&#039;&#039;&#039;note&#039;&#039;&#039;: The missing value handling is implemented only for linear interpolation (&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;0&#039;&#039;&#039;)&lt;br /&gt;
;Result:The interpolated vector &#039;&#039;y&#039;&#039; with length &#039;&#039;n&#039;&#039;. &lt;br /&gt;
;Usage 2:&amp;lt;code&amp;gt;interp(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;xp&amp;lt;/var&amp;gt; {, &amp;lt;var&amp;gt;type=1&amp;lt;/var&amp;gt;})&amp;lt;/code&amp;gt;&lt;br /&gt;
:Get interpolated values of function &amp;lt;var&amp;gt;y=f(x)&amp;lt;/var&amp;gt; at the position(s) &amp;lt;var&amp;gt;xp&amp;lt;/var&amp;gt;.&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;:x value vector&lt;br /&gt;
:;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;:y value vector, &#039;&#039;y[i]&#039;&#039; = f(&#039;&#039;x[i]&#039;&#039;)&lt;br /&gt;
:;&amp;lt;var&amp;gt;xp&amp;lt;/var&amp;gt;:position(s) for interpolation (number, vector or matrix)&lt;br /&gt;
:;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;:the type of interpolation to perform&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;0&#039;&#039;&#039;: linear interpolation&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;1&#039;&#039;&#039;: cubic spline interpolation&lt;br /&gt;
;Result:The interpolated values &#039;&#039;yp&#039;&#039; (same type as &#039;&#039;xp&#039;&#039;).&lt;br /&gt;
;See also: [[../rpolyreg|rpolyreg]], [[../qinterp|qinterp]], [[../map2map|map2map]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/interp&amp;diff=10706</id>
		<title>Programmer Guide/Command Reference/EVAL/interp</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/interp&amp;diff=10706"/>
		<updated>2025-10-28T14:22:27Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
;Usage 1:&amp;lt;code&amp;gt;interp(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; {, &amp;lt;var&amp;gt;mv&amp;lt;/var&amp;gt;})&amp;lt;/code&amp;gt;&lt;br /&gt;
:Create an interpolated copy of the vector &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; with length &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;.&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;:vector to be interpolated, x[i] = f(i)&lt;br /&gt;
:;&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;:length of the interpolated output vector; the interpolated vector can be shorter or longer than the original&lt;br /&gt;
:;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;:the type of interpolation to perform&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;0&#039;&#039;&#039;: linear interpolation&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;1&#039;&#039;&#039;: cubic spline interpolation&lt;br /&gt;
:;&amp;lt;var&amp;gt;mv&amp;lt;/var&amp;gt;:the value to use for &#039;&#039;missing values&#039;&#039;. If &#039;&#039;mv&#039;&#039; is given, then interpolation is stopped when &amp;lt;code&amp;gt;&#039;&#039;x&#039;&#039;[i] = &#039;&#039;mv&#039;&#039;&amp;lt;/code&amp;gt;. This means that the sections without missing values are individually interpolated. If &#039;&#039;mv&#039;&#039; is not supplied, the whole vector &#039;&#039;x&#039;&#039; is interpolated.&lt;br /&gt;
::&#039;&#039;&#039;note&#039;&#039;&#039;: The missing value handling is implemented only for linear interpolation (&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;0&#039;&#039;&#039;)&lt;br /&gt;
;Result:The interpolated vector &#039;&#039;y&#039;&#039; with length &#039;&#039;n&#039;&#039;. &lt;br /&gt;
;Usage 2:&amp;lt;code&amp;gt;interp(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;xp&amp;lt;/var&amp;gt; {, &amp;lt;var&amp;gt;type=1&amp;lt;/var&amp;gt;})&amp;lt;/code&amp;gt;&lt;br /&gt;
:Get interpolated values of function &amp;lt;var&amp;gt;y=f(x)&amp;lt;/var&amp;gt; at the position(s) &amp;lt;var&amp;gt;xp&amp;lt;/var&amp;gt;.&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;:x value vector&lt;br /&gt;
:;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;:y value vector, &#039;&#039;y[i]&#039;&#039; = f(&#039;&#039;x[i]&#039;&#039;)&lt;br /&gt;
:;&amp;lt;var&amp;gt;xp&amp;lt;/var&amp;gt;:position(s) for interpolation (number, vector or matrix)&lt;br /&gt;
:;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;:the type of interpolation to perform&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;0&#039;&#039;&#039;: linear interpolation&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;1&#039;&#039;&#039;: cubic spline interpolation&lt;br /&gt;
;Result:The interpolated values &#039;&#039;yp&#039;&#039; (same type as &#039;&#039;xp&#039;&#039;).&lt;br /&gt;
;See also: [[../rpolyreg|rpolyreg]], [[../qinterp|qinterp]], [[../map2map|map2map]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/interp&amp;diff=10705</id>
		<title>Programmer Guide/Command Reference/EVAL/interp</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/interp&amp;diff=10705"/>
		<updated>2025-10-28T14:00:33Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
;Usage 1:&amp;lt;code&amp;gt;interp(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; {, &amp;lt;var&amp;gt;mv&amp;lt;/var&amp;gt;})&amp;lt;/code&amp;gt;&lt;br /&gt;
:Create an interpolated copy of the vector &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; with length &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;.&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;:vector to be interpolated&lt;br /&gt;
:;&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;:length of the interpolated output vector; the interpolated vector can be shorter or longer than the original&lt;br /&gt;
:;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;:the type of interpolation to perform&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;0&#039;&#039;&#039;: linear interpolation&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;1&#039;&#039;&#039;: cubic spline interpolation&lt;br /&gt;
:;&amp;lt;var&amp;gt;mv&amp;lt;/var&amp;gt;:the value to use for &#039;&#039;missing values&#039;&#039;. If &#039;&#039;mv&#039;&#039; is given, then interpolation is stopped when &amp;lt;code&amp;gt;&#039;&#039;x&#039;&#039;[i] = &#039;&#039;mv&#039;&#039;&amp;lt;/code&amp;gt;. This means that the sections without missing values are individually interpolated. If &#039;&#039;mv&#039;&#039; is not supplied, the whole vector &#039;&#039;x&#039;&#039; is interpolated.&lt;br /&gt;
::&#039;&#039;&#039;note&#039;&#039;&#039;: The missing value handling is implemented only for linear interpolation (&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;0&#039;&#039;&#039;)&lt;br /&gt;
;Result:The interpolated vector &#039;&#039;y&#039;&#039; with length &#039;&#039;n&#039;&#039;. &lt;br /&gt;
;Usage 2:&amp;lt;code&amp;gt;interp(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;xp&amp;lt;/var&amp;gt; {, &amp;lt;var&amp;gt;type=1&amp;lt;/var&amp;gt;})&amp;lt;/code&amp;gt;&lt;br /&gt;
:Get interpolated values of function &amp;lt;var&amp;gt;y=f(x)&amp;lt;/var&amp;gt; at the position(s) &amp;lt;var&amp;gt;xp&amp;lt;/var&amp;gt;.&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;:x value vector&lt;br /&gt;
:;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;:y value vector, &#039;&#039;y[i]&#039;&#039; = f(&#039;&#039;x[i]&#039;&#039;)&lt;br /&gt;
:;&amp;lt;var&amp;gt;xp&amp;lt;/var&amp;gt;:position(s) for interpolation (number, vector or matrix)&lt;br /&gt;
:;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;:the type of interpolation to perform&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;0&#039;&#039;&#039;: linear interpolation&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;1&#039;&#039;&#039;: cubic spline interpolation&lt;br /&gt;
;Result:The interpolated values &#039;&#039;yp&#039;&#039; (same type as &#039;&#039;xp&#039;&#039;).&lt;br /&gt;
;See also: [[../rpolyreg|rpolyreg]], [[../qinterp|qinterp]], [[../map2map|map2map]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/interp&amp;diff=10704</id>
		<title>Programmer Guide/Command Reference/EVAL/interp</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/interp&amp;diff=10704"/>
		<updated>2025-10-28T13:54:50Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Create an interpolated copy of the vector &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;.&lt;br /&gt;
;Usage 1:&amp;lt;code&amp;gt;interp(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; {, &amp;lt;var&amp;gt;mv&amp;lt;/var&amp;gt;})&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;:vector to be interpolated&lt;br /&gt;
:;&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;:length of the interpolated output vector; the interpolated vector can be shorter or longer than the original&lt;br /&gt;
:;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;:the type of interpolation to perform&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;0&#039;&#039;&#039;: linear interpolation&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;1&#039;&#039;&#039;: cubic spline interpolation&lt;br /&gt;
:;&amp;lt;var&amp;gt;mv&amp;lt;/var&amp;gt;:the value to use for &#039;&#039;missing values&#039;&#039;. If &#039;&#039;mv&#039;&#039; is given, then interpolation is stopped when &amp;lt;code&amp;gt;&#039;&#039;x&#039;&#039;[i] = &#039;&#039;mv&#039;&#039;&amp;lt;/code&amp;gt;. This means that the sections without missing values are individually interpolated. If &#039;&#039;mv&#039;&#039; is not supplied, the whole vector &#039;&#039;x&#039;&#039; is interpolated.&lt;br /&gt;
::&#039;&#039;&#039;note&#039;&#039;&#039;: The missing value handling is implemented only for linear interpolation (&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;0&#039;&#039;&#039;)&lt;br /&gt;
;Result:The interpolated vector &#039;&#039;y&#039;&#039; with length &#039;&#039;n&#039;&#039;. &lt;br /&gt;
;Usage 2:&amp;lt;code&amp;gt;interp(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;xp&amp;lt;/var&amp;gt; {, &amp;lt;var&amp;gt;type=1&amp;lt;/var&amp;gt;})&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;:x value vector&lt;br /&gt;
:;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;:y value vector, &#039;&#039;y[i]&#039;&#039; = f(&#039;&#039;x[i]&#039;&#039;)&lt;br /&gt;
:;&amp;lt;var&amp;gt;xp&amp;lt;/var&amp;gt;:position(s) for interpolation (number, vector or matrix)&lt;br /&gt;
:;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;:the type of interpolation to perform&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;0&#039;&#039;&#039;: linear interpolation&lt;br /&gt;
::&#039;&#039;type&#039;&#039;=&#039;&#039;&#039;1&#039;&#039;&#039;: cubic spline interpolation&lt;br /&gt;
;Result:The interpolated values &#039;&#039;yp&#039;&#039; (same type as &#039;&#039;xp&#039;&#039;).&lt;br /&gt;
;See also: [[../rpolyreg|rpolyreg]], [[../qinterp|qinterp]], [[../map2map|map2map]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/corrfun&amp;diff=10703</id>
		<title>Programmer Guide/Command Reference/EVAL/corrfun</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/corrfun&amp;diff=10703"/>
		<updated>2023-09-01T08:39:08Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Compute the autocorrelation or cross-correlation function.&lt;br /&gt;
;Usage: &lt;br /&gt;
:{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;corrfun(&#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt; {, &#039;&#039;n&#039;&#039; {, &#039;&#039;scale&#039;&#039; {, cyclic}}})&amp;lt;/code&amp;gt;&lt;br /&gt;
| ... autocorrelation of &#039;&#039;x&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;corrfun(&#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;, &#039;&#039;y&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt; {, &#039;&#039;n&#039;&#039; {, &#039;&#039;scale&#039;&#039; {, cylic}}})&amp;lt;/code&amp;gt;&lt;br /&gt;
| ... cross correlation of &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
:;&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;: data vectors&lt;br /&gt;
:;&#039;&#039;n&#039;&#039;: the number of lags; 0 &amp;lt; n &amp;lt; &amp;lt;code&amp;gt;ncol(&#039;&#039;x&#039;&#039;)&amp;lt;/code&amp;gt; (default=&amp;lt;code&amp;gt;ncol(&#039;&#039;x&#039;&#039;)/2&amp;lt;/code&amp;gt;)&lt;br /&gt;
:;&#039;&#039;scale&#039;&#039;: specifies the scaling of the function:&lt;br /&gt;
::{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&#039;&#039;scale=0&#039;&#039; &lt;br /&gt;
| ... no scaling (default)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;scale=1&#039;&#039; &lt;br /&gt;
| ... &amp;quot;biased&amp;quot;, each lag &#039;&#039;i&#039;&#039; is scaled by the length of &#039;&#039;x&#039;&#039; (&amp;lt;code&amp;gt;1/ncol(&#039;&#039;x&#039;&#039;)&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;scale=2&#039;&#039; &lt;br /&gt;
| ... &amp;quot;unbiased&amp;quot;, each lag &#039;&#039;i&#039;&#039; is scaled by the number of correlated elements (&amp;lt;code&amp;gt;1/(ncol(&#039;&#039;x&#039;&#039;)-&#039;&#039;i&#039;&#039;)&amp;lt;/code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
:;&#039;&#039;cyclic&#039;&#039;: normal or cyclic indexing&lt;br /&gt;
::{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&#039;&#039;cyclic=0&#039;&#039; &lt;br /&gt;
| ... normal (default); (&amp;lt;code&amp;gt;acf[i]=sum(x[t]*y[t+i], t=0..ncol(x)-1-i)&amp;lt;code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cyclic!=0&#039;&#039;  &lt;br /&gt;
| ... cyclic; (&amp;lt;code&amp;gt;acf[i]=sum(x[t]*y[(t+i)%ncol(x)], t=0..ncol(x)-1)&amp;lt;code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Result: The autocorrelation function of the data vector &#039;&#039;x&#039;&#039; or the cross correlation function of the vectors &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039;. The result is a scalar (if &#039;&#039;n&#039;&#039;=1) or a vector with &#039;&#039;n&#039;&#039; elements.&lt;br /&gt;
;See also: [[../corr|corr]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/corrfun&amp;diff=10702</id>
		<title>Programmer Guide/Command Reference/EVAL/corrfun</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/corrfun&amp;diff=10702"/>
		<updated>2023-09-01T08:37:56Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Compute the autocorrelation or cross-correlation function.&lt;br /&gt;
;Usage: &lt;br /&gt;
:{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;corrfun(&#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt; {, &#039;&#039;n&#039;&#039; {, &#039;&#039;scale&#039;&#039; {, cyclic}}})&amp;lt;/code&amp;gt;&lt;br /&gt;
| ... autocorrelation of &#039;&#039;x&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;corrfun(&#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;, &#039;&#039;y&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt; {, &#039;&#039;n&#039;&#039; {, &#039;&#039;scale&#039;&#039; {, cylic}}})&amp;lt;/code&amp;gt;&lt;br /&gt;
| ... cross correlation of &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
:;&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;: data vectors&lt;br /&gt;
:;&#039;&#039;n&#039;&#039;: the number of lags; 0 &amp;lt; n &amp;lt; &amp;lt;code&amp;gt;ncol(&#039;&#039;x&#039;&#039;)&amp;lt;/code&amp;gt; (default=&amp;lt;code&amp;gt;ncol(&#039;&#039;x&#039;&#039;)/2&amp;lt;/code&amp;gt;)&lt;br /&gt;
:;&#039;&#039;scale&#039;&#039;: specifies the scaling of the function:&lt;br /&gt;
::{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&#039;&#039;scale=0&#039;&#039; &lt;br /&gt;
| ... no scaling (default)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;scale=1&#039;&#039; &lt;br /&gt;
| ... &amp;quot;biased&amp;quot;, each lag &#039;&#039;i&#039;&#039; is scaled by the length of &#039;&#039;x&#039;&#039; (&amp;lt;code&amp;gt;1/ncol(&#039;&#039;x&#039;&#039;)&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;scale=2&#039;&#039; &lt;br /&gt;
| ... &amp;quot;unbiased&amp;quot;, each lag &#039;&#039;i&#039;&#039; is scaled by the number of correlated elements (&amp;lt;code&amp;gt;1/(ncol(&#039;&#039;x&#039;&#039;)-&#039;&#039;i&#039;&#039;)&amp;lt;/code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
:;&#039;&#039;cyclic&#039;&#039;: normal or cyclic indexing&lt;br /&gt;
::{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&#039;&#039;cyclic=0&#039;&#039; &lt;br /&gt;
| ... normal (default); (&amp;lt;code&amp;gt;acf[i]=sum(x[t]*y[(t+i)%ncol(x)], t=0..ncol(x)-1-i)&amp;lt;code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cyclic!=0&#039;&#039;  &lt;br /&gt;
| ... cyclic; (&amp;lt;code&amp;gt;acf[i]=sum(x[t]*y[(t+i)%ncol(x)], t=0..ncol(x)-1)&amp;lt;code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Result: The autocorrelation function of the data vector &#039;&#039;x&#039;&#039; or the cross correlation function of the vectors &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039;. The result is a scalar (if &#039;&#039;n&#039;&#039;=1) or a vector with &#039;&#039;n&#039;&#039; elements.&lt;br /&gt;
;See also: [[../corr|corr]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/corrfun&amp;diff=10701</id>
		<title>Programmer Guide/Command Reference/EVAL/corrfun</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/corrfun&amp;diff=10701"/>
		<updated>2023-09-01T08:37:13Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Compute the autocorrelation or cross-correlation function.&lt;br /&gt;
;Usage: &lt;br /&gt;
:{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;corrfun(&#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt; {, &#039;&#039;n&#039;&#039; {, &#039;&#039;scale&#039;&#039; {, cyclic}}})&amp;lt;/code&amp;gt;&lt;br /&gt;
| ... autocorrelation of &#039;&#039;x&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;corrfun(&#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;, &#039;&#039;y&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt; {, &#039;&#039;n&#039;&#039; {, &#039;&#039;scale&#039;&#039; {, cylic}}})&amp;lt;/code&amp;gt;&lt;br /&gt;
| ... cross correlation of &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
:;&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;: data vectors&lt;br /&gt;
:;&#039;&#039;n&#039;&#039;: the number of lags; 0 &amp;lt; n &amp;lt; &amp;lt;code&amp;gt;ncol(&#039;&#039;x&#039;&#039;)&amp;lt;/code&amp;gt; (default=&amp;lt;code&amp;gt;ncol(&#039;&#039;x&#039;&#039;)/2&amp;lt;/code&amp;gt;)&lt;br /&gt;
:;&#039;&#039;scale&#039;&#039;: specifies the scaling of the function:&lt;br /&gt;
::{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&#039;&#039;scale=0&#039;&#039; &lt;br /&gt;
| ... no scaling (default)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;scale=1&#039;&#039; &lt;br /&gt;
| ... &amp;quot;biased&amp;quot;, each lag &#039;&#039;i&#039;&#039; is scaled by the length of &#039;&#039;x&#039;&#039; (&amp;lt;code&amp;gt;1/ncol(&#039;&#039;x&#039;&#039;)&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;scale=2&#039;&#039; &lt;br /&gt;
| ... &amp;quot;unbiased&amp;quot;, each lag &#039;&#039;i&#039;&#039; is scaled by the number of correlated elements (&amp;lt;code&amp;gt;1/(ncol(&#039;&#039;x&#039;&#039;)-&#039;&#039;i&#039;&#039;)&amp;lt;/code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
:;&#039;&#039;cyclic&#039;&#039;: normal or cyclic indexing&lt;br /&gt;
::{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&#039;&#039;cyclic=0&#039;&#039; &lt;br /&gt;
| ... normal (default); (&amp;lt;code&amp;gt;acf[i]=sum(x[t]*y[(t+i)%ncol(x)], t=0..ncol(x)-1-i)&amp;lt;code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cyclic!=0&#039;&#039;  &lt;br /&gt;
| ... cyclic; (&amp;lt;code&amp;gt;acf[i]=sum(x[t]*y[(t+i)%ncol(x)], t=0..ncol(x)-1)&amp;lt;code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Result: The autocorrelation of the data vector &#039;&#039;x&#039;&#039; or the cross correlation function of the vectors &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039;. The result is a scalar (if &#039;&#039;n&#039;&#039;=1) or a vector with &#039;&#039;n&#039;&#039; elements.&lt;br /&gt;
;See also: [[../corr|corr]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/corrfun&amp;diff=10700</id>
		<title>Programmer Guide/Command Reference/EVAL/corrfun</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/corrfun&amp;diff=10700"/>
		<updated>2023-09-01T08:33:09Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Compute the autocorrelation or cross-correlation function.&lt;br /&gt;
;Usage: &lt;br /&gt;
:{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;corrfun(&#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt; {, &#039;&#039;n&#039;&#039; {, &#039;&#039;scale&#039;&#039; {, cyclic}}})&amp;lt;/code&amp;gt;&lt;br /&gt;
| ... autocorrelation of &#039;&#039;x&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;corrfun(&#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;, &#039;&#039;y&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt; {, &#039;&#039;n&#039;&#039; {, &#039;&#039;scale&#039;&#039; {, cylic}}})&amp;lt;/code&amp;gt;&lt;br /&gt;
| ... cross correlation of &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
:;&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;: data vectors&lt;br /&gt;
:;&#039;&#039;n&#039;&#039;: the number of lags; 0 &amp;lt; n &amp;lt; &amp;lt;code&amp;gt;ncol(&#039;&#039;x&#039;&#039;)&amp;lt;/code&amp;gt; (default=&amp;lt;code&amp;gt;ncol(&#039;&#039;x&#039;&#039;)/2&amp;lt;/code&amp;gt;)&lt;br /&gt;
:;&#039;&#039;scale&#039;&#039;: specifies the scaling of the function:&lt;br /&gt;
::{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&#039;&#039;scale=0&#039;&#039; &lt;br /&gt;
| ... no scaling (default)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;scale=1&#039;&#039; &lt;br /&gt;
| ... &amp;quot;biased&amp;quot;, each lag &#039;&#039;i&#039;&#039; is scaled by the length of &#039;&#039;x&#039;&#039; (&amp;lt;code&amp;gt;1/ncol(&#039;&#039;x&#039;&#039;)&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;scale=2&#039;&#039; &lt;br /&gt;
| ... &amp;quot;unbiased&amp;quot;, each lag &#039;&#039;i&#039;&#039; is scaled by the number of correlated elements (&amp;lt;code&amp;gt;1/(ncol(&#039;&#039;x&#039;&#039;)-&#039;&#039;i&#039;&#039;)&amp;lt;/code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
:;&#039;&#039;cyclic&#039;&#039;: normal or cyclic indexing&lt;br /&gt;
::{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&#039;&#039;cyclic=0&#039;&#039; &lt;br /&gt;
| ... normal correlation (default)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cyclic!=0&#039;&#039; &lt;br /&gt;
| ... cyclic correlation (&amp;lt;code&amp;gt;x[t]*y[(t+i)%ncol(x)]&amp;lt;code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Result: The autocorrelation of the data vector &#039;&#039;x&#039;&#039; or the cross correlation function of the vectors &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039;. The result is a scalar (if &#039;&#039;n&#039;&#039;=1) or a vector with &#039;&#039;n&#039;&#039; elements.&lt;br /&gt;
;See also: [[../corr|corr]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/corrfun&amp;diff=10699</id>
		<title>Programmer Guide/Command Reference/EVAL/corrfun</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/corrfun&amp;diff=10699"/>
		<updated>2023-09-01T08:31:42Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Compute the autocorrelation or cross-correlation function.&lt;br /&gt;
;Usage: &lt;br /&gt;
:{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;corrfun(&#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt; {, &#039;&#039;n&#039;&#039; {, &#039;&#039;scale&#039;&#039; {, cyclic}}})&amp;lt;/code&amp;gt;&lt;br /&gt;
| ... autocorrelation of &#039;&#039;x&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;corrfun(&#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;, &#039;&#039;y&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt; {, &#039;&#039;n&#039;&#039; {, &#039;&#039;scale&#039;&#039; {, cylic}}})&amp;lt;/code&amp;gt;&lt;br /&gt;
| ... cross correlation of &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
:;&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;: data vectors&lt;br /&gt;
:;&#039;&#039;n&#039;&#039;: the number of lags; 0 &amp;lt; n &amp;lt; &amp;lt;code&amp;gt;ncol(&#039;&#039;x&#039;&#039;)&amp;lt;/code&amp;gt; (default=&amp;lt;code&amp;gt;ncol(&#039;&#039;x&#039;&#039;)/2&amp;lt;/code&amp;gt;)&lt;br /&gt;
:;&#039;&#039;scale&#039;&#039;: specifies the scaling of the function:&lt;br /&gt;
::{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&#039;&#039;scale=0&#039;&#039; &lt;br /&gt;
| ... no scaling (default)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;scale=1&#039;&#039; &lt;br /&gt;
| ... &amp;quot;biased&amp;quot;, each lag &#039;&#039;i&#039;&#039; is scaled by the length of &#039;&#039;x&#039;&#039; (&amp;lt;code&amp;gt;1/ncol(&#039;&#039;x&#039;&#039;)&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;scale=2&#039;&#039; &lt;br /&gt;
| ... &amp;quot;unbiased&amp;quot;, each lag &#039;&#039;i&#039;&#039; is scaled by the number of correlated elements (&amp;lt;code&amp;gt;1/(ncol(&#039;&#039;x&#039;&#039;)-&#039;&#039;i&#039;&#039;)&amp;lt;/code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
::{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&#039;&#039;cyclic=0&#039;&#039; &lt;br /&gt;
| ... normal correlation (default)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cyclic!=0&#039;&#039; &lt;br /&gt;
| ... cyclic correlation (&amp;lt;code&amp;gt;x[t]*y[(t+i)%ncol(x)]&amp;lt;code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Result: The autocorrelation of the data vector &#039;&#039;x&#039;&#039; or the cross correlation function of the vectors &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039;. The result is a scalar (if &#039;&#039;n&#039;&#039;=1) or a vector with &#039;&#039;n&#039;&#039; elements.&lt;br /&gt;
;See also: [[../corr|corr]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/corrfun&amp;diff=10698</id>
		<title>Programmer Guide/Command Reference/EVAL/corrfun</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/corrfun&amp;diff=10698"/>
		<updated>2023-09-01T08:30:31Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Compute the autocorrelation or cross-correlation function.&lt;br /&gt;
;Usage: &lt;br /&gt;
:{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;corrfun(&#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt; {, &#039;&#039;n&#039;&#039; {, &#039;&#039;scale&#039;&#039; {, cyclic}}})&amp;lt;/code&amp;gt;&lt;br /&gt;
| ... autocorrelation of &#039;&#039;x&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;corrfun(&#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;, &#039;&#039;y&#039;&#039;&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt; {, &#039;&#039;n&#039;&#039; {, &#039;&#039;scale&#039;&#039; {, cylic}}})&amp;lt;/code&amp;gt;&lt;br /&gt;
| ... cross correlation of &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
:;&#039;&#039;x&#039;&#039;, &#039;&#039;y&#039;&#039;: data vectors&lt;br /&gt;
:;&#039;&#039;n&#039;&#039;: the number of lags; 0 &amp;lt; n &amp;lt; &amp;lt;code&amp;gt;ncol(&#039;&#039;x&#039;&#039;)&amp;lt;/code&amp;gt; (default=&amp;lt;code&amp;gt;ncol(&#039;&#039;x&#039;&#039;)/2&amp;lt;/code&amp;gt;)&lt;br /&gt;
:;&#039;&#039;scale&#039;&#039;: specifies the scaling of the function:&lt;br /&gt;
::{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&#039;&#039;scale=0&#039;&#039; &lt;br /&gt;
| ... no scaling (default)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;scale=1&#039;&#039; &lt;br /&gt;
| ... &amp;quot;biased&amp;quot;, each lag &#039;&#039;i&#039;&#039; is scaled by the length of &#039;&#039;x&#039;&#039; (&amp;lt;code&amp;gt;1/ncol(&#039;&#039;x&#039;&#039;)&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;scale=2&#039;&#039; &lt;br /&gt;
| ... &amp;quot;unbiased&amp;quot;, each lag &#039;&#039;i&#039;&#039; is scaled by the number of correlated elements (&amp;lt;code&amp;gt;1/(ncol(&#039;&#039;x&#039;&#039;)-&#039;&#039;i&#039;&#039;)&amp;lt;/code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
::{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
|&#039;&#039;cyclic=0&#039;&#039; &lt;br /&gt;
| ... normal correlation (default)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cyclic!=0&#039;&#039; &lt;br /&gt;
| ... cyclic correlation (&amp;lt;code&amp;gt;a[i]*b[(i+lag)%ncol(a)]&amp;lt;code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;Result: The autocorrelation of the data vector &#039;&#039;x&#039;&#039; or the cross correlation function of the vectors &#039;&#039;x&#039;&#039; and &#039;&#039;y&#039;&#039;. The result is a scalar (if &#039;&#039;n&#039;&#039;=1) or a vector with &#039;&#039;n&#039;&#039; elements.&lt;br /&gt;
;See also: [[../corr|corr]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/BDataSet&amp;diff=10697</id>
		<title>Programmer Guide/Macro Library/BDataSet</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/BDataSet&amp;diff=10697"/>
		<updated>2023-08-28T13:50:26Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* OpenAutoAFile */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}} - Project Document and Project Management}}&lt;br /&gt;
:&#039;&#039;&#039;File&#039;&#039;&#039;: BDataSet.STX, linked to library STX.LIB&lt;br /&gt;
:&#039;&#039;&#039;Parent class&#039;&#039;&#039;: [[Programmer Guide/Macro Library/BXMLDoc|BXMLDoc]]&lt;br /&gt;
:&#039;&#039;&#039;See also&#039;&#039;&#039;: [[Programmer_Guide/Macro_Library/BXMLDoc|BSTXIni]], [[Programmer_Guide/Macro_Library/DataSetCmd|DataSetCmd]] &lt;br /&gt;
&lt;br /&gt;
This class implements the &#039;&#039;&#039;project document&#039;&#039;&#039;. The project document is the global database available to all {{STx}} applications and scripts and contains all data and links of the current project. The content of the project document is stored in a [[Programmer_Guide/Shell_Items/File|XML file item]] The programmer must not create or destroy the project object because these functions are performed by the application startup and cleanup macros.&lt;br /&gt;
&lt;br /&gt;
: Never ever call the member functions &amp;lt;code&amp;gt;CONSTRUCT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DESTRUCT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;CLOSE&amp;lt;/code&amp;gt;!&lt;br /&gt;
&lt;br /&gt;
At application startup a &amp;lt;code&amp;gt;BDataSet&amp;lt;/code&amp;gt; instance is created and linked to the global project document which is created and managed by the {{STx}} master shell. The name of this instance is stored in the shell variable &amp;lt;var&amp;gt;BDATASET&amp;lt;/var&amp;gt;. This object must be used to access the project document.&lt;br /&gt;
&lt;br /&gt;
The class &amp;lt;code&amp;gt;BDataSet&amp;lt;/code&amp;gt; is derived from the class &amp;lt;code&amp;gt;[[Programmer_Guide/Macro_Library/BXMLDoc|BXMLDoc]]&amp;lt;/code&amp;gt;. Beware of using the base class functions, since they do not update the &amp;lt;code&amp;gt;BDataSet&amp;lt;/code&amp;gt; member variables! No static commands are implemented by this class; a call to the macro &amp;lt;code&amp;gt;BDataSet&amp;lt;/code&amp;gt; (e.g. &amp;lt;code&amp;gt;bdataset save&amp;lt;/code&amp;gt;) will do nothing, returning an empty string.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important note&#039;&#039;&#039;: A shell or a script should only access or change the content of the project document, while it is attached (locked). This is very important, because the project document can be (and is often) accessed by all running shells (e.g. {{STx}} applications or scripts). A code section accessing the project content should start with &amp;lt;code&amp;gt;$bdataset attach&amp;lt;/code&amp;gt; and end with &amp;lt;code&amp;gt;$bdataset detach&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;Example for using attach/detach:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 // first attach call - lock project document and save current xml-position (pos1)&lt;br /&gt;
 $bdataset attach&lt;br /&gt;
 ... &lt;br /&gt;
 //	second attach call - save xml-position (pos2)&lt;br /&gt;
 $bdataset attach&lt;br /&gt;
 ...&lt;br /&gt;
 // first detach call - restore xml-position pos2, project document remains locked!&lt;br /&gt;
 $bdataset detach&lt;br /&gt;
 ...&lt;br /&gt;
 //	second detach call - restore xml-position pos1 and unlock project document, &lt;br /&gt;
 //	if the project document was changed by the code between first attach and second detach,&lt;br /&gt;
 // the message &amp;quot;DATASETCHANGED&amp;quot; is sent to all running shells&lt;br /&gt;
 $bdataset detach&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Project File Management==&lt;br /&gt;
&lt;br /&gt;
===Validate===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset validate &amp;lt;var&amp;gt;showmsg&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;showmsg&amp;lt;/var&amp;gt;: if set to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; a message is displayed also if no invalid elements were detected; default: no message if no invalid elements were found&lt;br /&gt;
;Result: number of invalid elements (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for none)&lt;br /&gt;
;Description: This function checks all elements (sound files, segments, ...) of the project for validity. If invalid elements are detected, they can be displayed and the user is asked if they should be deleted or not. &lt;br /&gt;
&lt;br /&gt;
===Save===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset save [ &amp;lt;var&amp;gt;path=* ; auto=0 ; pbh=* ]&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;path&amp;lt;/var&amp;gt;: project file path; if not specified or &#039;&#039;&#039;*&#039;&#039;&#039;, the last load/save path is used&lt;br /&gt;
:;&amp;lt;var&amp;gt;auto&amp;lt;/var&amp;gt;: if set to &#039;&#039;&#039;1&#039;&#039;&#039; the user is &#039;&#039;&#039;not&#039;&#039;&#039; prompted with a yes/no dialog as to whether they want to save or not.&lt;br /&gt;
:;&amp;lt;var&amp;gt;pbh&amp;lt;/var&amp;gt;: a progress dialog handle (see [[Programmer_Guide/Macro_Library/ProgressBox|macro ProgressBox]]); use &#039;&#039;&#039;*&#039;&#039;&#039; if no progress box should be displayed&lt;br /&gt;
;Result: &#039;&#039;&#039;0&#039;&#039;&#039; for success or a non-zero error code&lt;br /&gt;
;Description: This function saves the current project to the specified or last assigned project file. During the load process all necessary element validations and path conversions are performed. If the project is in mode &#039;&#039;&#039;linked&#039;&#039;&#039; also the segment metadata files of all linked sound files are updated.&lt;br /&gt;
&lt;br /&gt;
===Load===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset load [ &amp;lt;var&amp;gt;filepath&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
;&amp;lt;var&amp;gt;filepath&amp;lt;/var&amp;gt;: the path of the project file to be loaded; if not specified the last assigned path is used&lt;br /&gt;
;Result: &#039;&#039;&#039;0&#039;&#039;&#039; for success or a non-zero error code&lt;br /&gt;
;Description: This function loads the specified or last assigned project file. During the load process all necessary path conversions, additional load operations of linked files and element validations are performed. The progress of the load process is display in a popup progress dialog.&lt;br /&gt;
&lt;br /&gt;
==Project Properties==&lt;br /&gt;
&lt;br /&gt;
===IsNewFile===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset isnewfile&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result: &#039;&#039;&#039;1&#039;&#039;&#039; if the project file is new (not named and not saved) and &#039;&#039;&#039;0&#039;&#039;&#039; otherwise.&lt;br /&gt;
&lt;br /&gt;
===GetPath===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset getpath&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result: the full path of the project file or an empty string&lt;br /&gt;
&lt;br /&gt;
===SetLink===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset setlink &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;: &#039;&#039;&#039;0&#039;&#039;&#039; (or &#039;&#039;&#039;no&#039;&#039;&#039;) to set project to &#039;&#039;&#039;not linked&#039;&#039;&#039; and &#039;&#039;&#039;1&#039;&#039;&#039; (or &#039;&#039;&#039;yes&#039;&#039;&#039;) to set it to &#039;&#039;&#039;linked&#039;&#039;&#039;&lt;br /&gt;
;Result: &#039;&#039;&#039;0&#039;&#039;&#039; if the selected mode was enabled and &#039;&#039;&#039;1&#039;&#039;&#039; if the function fails.&lt;br /&gt;
;Description: This function change the project attribute &amp;lt;code&amp;gt;AFile&amp;lt;/code&amp;gt; (attribute of the root-element &amp;lt;code&amp;gt;STXDataSet&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &amp;lt;code&amp;gt;AFile=Link&amp;lt;/code&amp;gt;: The project is in mode &#039;&#039;&#039;linked&#039;&#039;&#039;. The segment metadata are stored in {{STx}} metadata files, which are xml-files with the same pathname as the sound file and the filetype &#039;&#039;&#039;stxsm&#039;&#039;&#039;. The segment metadata files of sound file linked to the project are loaded/saved automatically, when the project is loaded/saved. The project file contains only links to the sound files of the project.&lt;br /&gt;
* &amp;lt;code&amp;gt;AFile&amp;lt;/code&amp;gt; is not assigned: The project is in mode &#039;&#039;&#039;not linked&#039;&#039;&#039;. All data of the project, including segment metadata, are stored in the project file. A project in this mode may contain multiple links to one sound file (e.g. to manage different segmentations of the same signal).&lt;br /&gt;
&lt;br /&gt;
===IsLinked===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset islinked&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result: &#039;&#039;&#039;1&#039;&#039;&#039; if the project is set to &#039;&#039;&#039;linked&#039;&#039;&#039; and &#039;&#039;&#039;0&#039;&#039;&#039; otherwise&lt;br /&gt;
&lt;br /&gt;
===SetRelativity===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset setrelativity &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;: &#039;&#039;&#039;0&#039;&#039;&#039; (or &#039;&#039;&#039;no&#039;&#039;&#039;) to disable the relative path feature and &#039;&#039;&#039;1&#039;&#039;&#039; (or &#039;&#039;&#039;yes&#039;&#039;&#039;) to enable it&lt;br /&gt;
;Result: &#039;&#039;&#039;0&#039;&#039;&#039; if the selected mode was enabled and &#039;&#039;&#039;1&#039;&#039;&#039; if the function has failed.&lt;br /&gt;
;Description: This function can be used to enable/disable the relative path option. If the relative path option is enabled, for sound file which are in the same directory as the project file or in subdirectories the relative path is saved in the project. This feature is useful if the project should be copied to other places. The relativity state is saved in the attribute &amp;lt;code&amp;gt;ARelative&amp;lt;/code&amp;gt; of the root element of the project. If this attribute has the value &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt;, relative sound file pathes are used, otherwise (&amp;lt;code&amp;gt;ARelative&amp;lt;/code&amp;gt;) equals &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt; or is not set) absolute pathes are used.&lt;br /&gt;
&lt;br /&gt;
===IsRelative===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset isrelative&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result: &#039;&#039;&#039;1&#039;&#039;&#039; if the project is set to &#039;&#039;&#039;relative sound file pathes&#039;&#039;&#039; and &#039;&#039;&#039;0&#039;&#039;&#039; otherwise&lt;br /&gt;
&lt;br /&gt;
==Audio Set Functions==&lt;br /&gt;
&lt;br /&gt;
===AddASet===&lt;br /&gt;
;Usage:&lt;br /&gt;
:;&amp;lt;code&amp;gt;$bdataset addaset &amp;lt;var&amp;gt;tag ; targetset ; id ; srate ; channels ; update&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;: the type off the new audio set; this can be ...&lt;br /&gt;
::* the name of an existing sound file to be added to the project&lt;br /&gt;
::* the keyword &#039;&#039;&#039;AFile&#039;&#039;&#039; or &#039;&#039;&#039;*&#039;&#039;&#039; to create (via dialog) a new soundfile and add it to the project&lt;br /&gt;
::* the keyword &#039;&#039;&#039;ASequence&#039;&#039;&#039; or &#039;&#039;&#039;Sequence&#039;&#039;&#039; to add a new sequence to the project&lt;br /&gt;
:;&amp;lt;var&amp;gt;targetset&amp;lt;/var&amp;gt;: the set (folder) where the new audio set should be located; if set to &#039;&#039;&#039;*&#039;&#039;&#039;, the target is selected via a dialog&lt;br /&gt;
:;&amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt;: the unique id of the new audio set; if set to &#039;&#039;&#039;*&#039;&#039;&#039; an unique id is choosen automatically&lt;br /&gt;
:;&amp;lt;var&amp;gt;srate&amp;lt;/var&amp;gt;: the sampling rate in Hz for a new soundfile or a sequence&lt;br /&gt;
:;&amp;lt;var&amp;gt;channels&amp;lt;/var&amp;gt;: the number of channels for a new soundfile or a sequence&lt;br /&gt;
:;&amp;lt;var&amp;gt;update&amp;lt;/var&amp;gt;: if set to &#039;&#039;&#039;1&#039;&#039;&#039; (or &#039;&#039;&#039;yes&#039;&#039;&#039;) the function &amp;lt;code&amp;gt;DataSetCmd RefreshAll&amp;lt;/code&amp;gt; is called to refresh the project GUI&lt;br /&gt;
;Result: if successful, the the reference (iref) of the added audio set if returned, otherwise an empty string&lt;br /&gt;
;Description: This function adds an audio set (sound file or sequence) to the project.&lt;br /&gt;
&lt;br /&gt;
===AFileIsLinked===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset afileislinked &amp;lt;var&amp;gt;path&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;path&amp;lt;/var&amp;gt;: the path of the sound file to be tested&lt;br /&gt;
;Result: &#039;&#039;&#039;1&#039;&#039;&#039; if the sound file &amp;lt;var&amp;gt;path&amp;lt;/var&amp;gt; is already linked to the project and &#039;&#039;&#039;0&#039;&#039;&#039; otherwise.&lt;br /&gt;
;Description: This function tests if a sound file is already linked to the project or not. The check is performed only if the project is set to &#039;&#039;&#039;linked&#039;&#039;&#039;. For &#039;&#039;&#039;not linked&#039;&#039;&#039; projects the functions returns always &#039;&#039;&#039;0&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===SelectASet===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset selectaset &amp;lt;var&amp;gt;aset ; type&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;aset&amp;lt;/var&amp;gt;: the reference (iref or position) of an audio set or of an element inside an audio set (e.g. a segment)&lt;br /&gt;
:;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;: assumed type of the audio set: &#039;&#039;&#039;AFile&#039;&#039;&#039;, &#039;&#039;&#039;Soundfile&#039;&#039;&#039;, &#039;&#039;&#039;ASequence&#039;&#039;&#039;, &#039;&#039;&#039;Sequence&#039;&#039;&#039; or &#039;&#039;&#039;*&#039;&#039;&#039; (default) if type is unknown&lt;br /&gt;
;Result: &#039;&#039;&#039;0&#039;&#039;&#039; if the audio set is selected and a non-zero error code otherwise&lt;br /&gt;
;Description: This function selects the specified audio set. If the function was sussessful, the following member variables of the object &amp;lt;code&amp;gt;$bdataset&amp;lt;/code&amp;gt; are assigned:&lt;br /&gt;
::*&amp;lt;code&amp;gt;&amp;amp;asetPos&amp;lt;/code&amp;gt;: xml position of the audio set element&lt;br /&gt;
::*&amp;lt;code&amp;gt;&amp;amp;asetTag&amp;lt;/code&amp;gt;: xml tag of the audio set element (AFile or ASequence)&lt;br /&gt;
::*&amp;lt;code&amp;gt;&amp;amp;asetID&amp;lt;/code&amp;gt;: xml element id (value of attribute ID)&lt;br /&gt;
::*&amp;lt;code&amp;gt;&amp;amp;asetSR&amp;lt;/code&amp;gt;: sampling rate in Hz (value of attribute SR)&lt;br /&gt;
::*&amp;lt;code&amp;gt;&amp;amp;asetCH&amp;lt;/code&amp;gt;: number of channels (value of attribute CH)&lt;br /&gt;
::*&amp;lt;code&amp;gt;&amp;amp;asetFile&amp;lt;/code&amp;gt;: sound file path (only if tag equals AFile)&lt;br /&gt;
&lt;br /&gt;
===GetASetInfo===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset getasetinfo [ &amp;lt;var&amp;gt;aset ; type&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;aset&amp;lt;/var&amp;gt;: the reference (iref or position) of an audio set or of an element inside an audio set (e.g. a segment)&lt;br /&gt;
:;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;: assumed type of the audio set: &#039;&#039;&#039;AFile&#039;&#039;&#039;, &#039;&#039;&#039;Soundfile&#039;&#039;&#039;, &#039;&#039;&#039;ASequence&#039;&#039;&#039;, &#039;&#039;&#039;Sequence&#039;&#039;&#039; or &#039;&#039;&#039;*&#039;&#039;&#039; (default) if type is unknown&lt;br /&gt;
;Result: an empty string for error or the available attributes of the selected audio set: &lt;br /&gt;
::* for sound files: &amp;lt;code&amp;gt;Soundfile ; &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;sr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ch&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;filepath&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
::* for sequences: &amp;lt;code&amp;gt;Sequence ; &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;sr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ch&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
;Description: This function retrieves information about the selected audio set. If arguments are specified, they are passed to the function &amp;lt;code&amp;gt;SelectASet&amp;lt;/code&amp;gt; to select the audio set, before the audio set information is returned.&lt;br /&gt;
&lt;br /&gt;
===OpenAutoAFile===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset openautoafile &amp;lt;var&amp;gt;mode ; srate ; channels ; code&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;: &lt;br /&gt;
::* &#039;&#039;&#039;0&#039;&#039;&#039; &amp;amp;rarr; replace the last created autofile&lt;br /&gt;
::* &#039;&#039;&#039;1&#039;&#039;&#039; &amp;amp;rarr; get last created autofile, file is replaced if &amp;lt;var&amp;gt;srate&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;channels&amp;lt;/var&amp;gt; are different&lt;br /&gt;
::* &#039;&#039;&#039;2&#039;&#039;&#039; &amp;amp;rarr; create and add a new autofile&lt;br /&gt;
:;&amp;lt;var&amp;gt;srate&amp;lt;/var&amp;gt;: sampling rate in Hz&lt;br /&gt;
:;&amp;lt;var&amp;gt;channels&amp;lt;/var&amp;gt;: number of signal channels&lt;br /&gt;
:;&amp;lt;var&amp;gt;code&amp;lt;/var&amp;gt; sample code (see [[Programmer_Guide/Command_Reference/LOAD#LOAD_SOUNDFILE|command LOAD SOUNDFILE]])&lt;br /&gt;
;Result: &#039;&amp;lt;var&amp;gt;iref ; created&amp;lt;/var&amp;gt;&#039; with:&lt;br /&gt;
::* &amp;lt;var&amp;gt;iref&amp;lt;/var&amp;gt;: the audio set reference of the autofile&lt;br /&gt;
::* &amp;lt;var&amp;gt;created&amp;lt;/var&amp;gt;: &#039;&#039;&#039;1&#039;&#039;&#039; if a new sound file was created and &#039;&#039;&#039;0&#039;&#039;&#039; if an existing sound file was opened&lt;br /&gt;
;Description: This function creates/opens an temporary sound file and adds it to the project. Temporary sound files (autofiles) can be used to save results of signal processing/modification operations. All autofiles are deleted when the project is closed.&lt;br /&gt;
&lt;br /&gt;
===RemoveTmpSet===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset removetmpset &amp;lt;var&amp;gt;del&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;del&amp;lt;/var&amp;gt;: &#039;&#039;&#039;0&#039;&#039;&#039; to copy the tmp-set and &#039;&#039;&#039;1&#039;&#039;&#039; to delete the tmp-set and all temporary sound files&lt;br /&gt;
;Result: an empty string if the tmp-set was deleted and the name of an xml file item containing the tmp-set elements otherwise&lt;br /&gt;
;Description: This function removes the tmp-set, this is the set element (folder) containing all temporary audio sets (autofiles), from the project. If the argument &amp;lt;var&amp;gt;del&amp;lt;/var&amp;gt; is set to &#039;&#039;&#039;1&#039;&#039;&#039;, the temporary sound files are deleted and the tmp-set is removed from the project. Otherwise, the tmp-set is copied to a new xml file item, which is returned to the caller, and than it is removed from the project, but the temporary sound files are not deleted.&lt;br /&gt;
&lt;br /&gt;
===RestoreTmpSet===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset restoretmpset &amp;lt;var&amp;gt;xmlfile&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;xmlfile&amp;lt;/var&amp;gt;: a xml file item containing the tmp-set to be restored; normally created with &amp;lt;code&amp;gt;$bdataset removetmpset 0&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result: none (void)&lt;br /&gt;
;Description: This function add the tmp-set contained in xml file item passed to the function to the project.&lt;br /&gt;
&lt;br /&gt;
==Audio Segment Functions==&lt;br /&gt;
&lt;br /&gt;
===SelectASeg===&lt;br /&gt;
;Usage: :&amp;lt;code&amp;gt;$bdataset selectaseg &amp;lt;var&amp;gt;aset; aseg&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;aset&amp;lt;/var&amp;gt;: audio set reference (position or iref)&lt;br /&gt;
:;&amp;lt;var&amp;gt;aseg&amp;lt;/var&amp;gt;: audio segment reference or id&lt;br /&gt;
;Result: &#039;&#039;&#039;0&#039;&#039;&#039; for success or a non-zero error code&lt;br /&gt;
;Description: Selects the segment &amp;lt;var&amp;gt;aseg&amp;lt;/var&amp;gt; of the audio set &amp;lt;var&amp;gt;aset&amp;lt;/var&amp;gt;. This function calls &amp;lt;code&amp;gt;SelectASet&amp;lt;/code&amp;gt; first to select the audio set. If the function succeeds, the current element of the xml project file is the selected segment.&lt;br /&gt;
&lt;br /&gt;
===EvalSegment===&lt;br /&gt;
;Usage: :&amp;lt;code&amp;gt;$bdataset evalsegment &amp;lt;var&amp;gt;aset; aseg; fmt&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;aset&amp;lt;/var&amp;gt;: audio set reference (position or iref)&lt;br /&gt;
:;&amp;lt;var&amp;gt;asegid&amp;lt;/var&amp;gt;: audio segment reference, id or expression&lt;br /&gt;
:;&amp;lt;var&amp;gt;fmt&amp;lt;/var&amp;gt;select output format and time unit (see result)&lt;br /&gt;
;Result:&lt;br /&gt;
::* empty string on error&lt;br /&gt;
::* &amp;lt;var&amp;gt;fmt&amp;lt;/var&amp;gt;=&#039;&#039;&#039;samples&#039;&#039;&#039; &amp;amp;rarr; &#039;&amp;lt;var&amp;gt;beginsample endsample numberofsamples&#039; (boundaries in samples, separated by blanks)&lt;br /&gt;
::* &amp;lt;var&amp;gt;fmt&amp;lt;/var&amp;gt;=&#039;&#039;&#039;seconds&#039;&#039;&#039; &amp;amp;rarr; &#039;&amp;lt;var&amp;gt;begintime endtime duration&#039; (time values in seconds, separated by blanks)&lt;br /&gt;
::* &amp;lt;var&amp;gt;fmt&amp;lt;/var&amp;gt;=&#039;&#039;&#039;segment&#039;&#039;&#039; &amp;amp;rarr; &#039;&amp;lt;var&amp;gt;segmentexpression&#039; (a valid segment expression for the specified segment)&lt;br /&gt;
;Description: This function returns the boundaries of the specified segment or the segment expression in the selected format.&lt;br /&gt;
;See also: [[Programmer_Guide/Command_Reference/SEGMENT|command SEGMENT]]&lt;br /&gt;
&lt;br /&gt;
===SetSegment===&lt;br /&gt;
;Usage: &lt;br /&gt;
:&amp;lt;code&amp;gt;$bdataset setsegment &amp;lt;var&amp;gt;aset; asegid; asegexpr; attrname=attrvalue; ...&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;$bdataset setsegment &amp;lt;var&amp;gt;aset; asegid; asegexpr; attrtable&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;aset&amp;lt;/var&amp;gt;: audio set reference (position or iref)&lt;br /&gt;
:;&amp;lt;var&amp;gt;asegid&amp;lt;/var&amp;gt;: audio segment id&lt;br /&gt;
:;&amp;lt;var&amp;gt;attrname=valuename&amp;lt;/var&amp;gt;: name and value segment attribute; multiple attribute assignments can be specified separated by semi-colons&lt;br /&gt;
:;&amp;lt;var&amp;gt;attrtable&amp;lt;/var&amp;gt;: a simple table containing von attribute assignment (name=value) per line; Warning: This table is deleted after processing!&lt;br /&gt;
;Result: &#039;&#039;&#039;0&#039;&#039;&#039; for success or a non-zero error code&lt;br /&gt;
::* for positive error codes (&amp;gt;0) see [[Programmer_Guide/Command_Reference/EMSG|command EMSG]]&lt;br /&gt;
::* -4 &amp;amp;rarr; invalid segment id &amp;lt;var&amp;gt;asegid&amp;lt;/var&amp;gt; (for new segment)&lt;br /&gt;
::* -3 &amp;amp;rarr; bad segment expression &amp;lt;var&amp;gt;asegexpr&amp;lt;/var&amp;gt;&lt;br /&gt;
::* -2 &amp;amp;rarr; bad segment address (&amp;lt;var&amp;gt;aset&amp;lt;/var&amp;gt; and/or &amp;lt;var&amp;gt;asegid&amp;lt;/var&amp;gt;)&lt;br /&gt;
::* -1 &amp;amp;rarr; cannot add segment to database (e.g. due to a duplicate name &amp;lt;var&amp;gt;asegid&amp;lt;/var&amp;gt;)&lt;br /&gt;
;Description: This functions creates a new segment &amp;lt;var&amp;gt;asegid&amp;lt;/var&amp;gt; with the boundaries specified by &amp;lt;var&amp;gt;asegexpr&amp;lt;/var&amp;gt; and assignes the specified attributes. If the segment with id &amp;lt;var&amp;gt;asegid&amp;lt;/var&amp;gt; already exists, only the boundaries and attributes are updated.&lt;br /&gt;
:* To leave the boundaries of an existing segment (attributes P and L) untouched, set &amp;lt;var&amp;gt;asegexpr&amp;lt;/var&amp;gt; to &#039;&#039;&#039;*&#039;&#039;&#039;.&lt;br /&gt;
:* To remove an attribute, leave the attribute value empty (&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;attrname&amp;lt;/var&amp;gt;=&amp;lt;/code&amp;gt;).&lt;br /&gt;
:* Error and warning messages are written to the {{STx}} log-window.&lt;br /&gt;
&lt;br /&gt;
===GetSegment===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset getsegment &amp;lt;var&amp;gt;aset; aseg; attr1; ...&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;aset&amp;lt;/var&amp;gt;: audio set reference (position or iref)&lt;br /&gt;
:;&amp;lt;var&amp;gt;aseg&amp;lt;/var&amp;gt;: audio segment reference or id&lt;br /&gt;
:;&amp;lt;var&amp;gt;attr1&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;attr2&amp;lt;/var&amp;gt;, ... : keyword or name of requested attribute(s)&lt;br /&gt;
;Result: The function returns the values of the requested attributes or an empty string on error. If more than one value is requested, the returned attribute values are separated by semi-colons.&lt;br /&gt;
;Description: This functions retrieves attributes (properties) of the specified segment. The table below shows the possible values and keywords for the attribute  argument(s).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
! attrX !! return value !! comment &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; || segment id || attribute ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;iref&amp;lt;/code&amp;gt; || segment reference (iref) ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;segment [&amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt; || segment expression || attributes P and L&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;position [&amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt; or&amp;lt;br/&amp;gt;&amp;lt;code&amp;gt;begin [&amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt; || begin of segment || attribute P&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;end [&amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt; || end of segment || attribute P and L&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;length [&amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt; || segment length || attribute L&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;channel [&amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt; || channel assigned to segment || attribute CH&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;attrname&amp;lt;/var&amp;gt; || value of attribute &amp;lt;var&amp;gt;attrname&amp;lt;/var&amp;gt; || attribute names are case sensitive!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: The optional argument &amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt; specifies the unit for time values. It can be &#039;&#039;&#039;samples&#039;&#039;&#039; (default), &#039;&#039;&#039;seconds&#039;&#039;&#039;, &#039;&#039;&#039;milliseconds&#039;&#039;&#039; (or &#039;&#039;&#039;ms&#039;&#039;&#039;) or &#039;&#039;&#039;hms&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===FindSegment===&lt;br /&gt;
;Usage:&lt;br /&gt;
:&amp;lt;code&amp;gt;$bdataset findsegment first; &amp;lt;var&amp;gt;aset ; asegid ; range ; attrexpr1 ; ... &amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;$bdataset findsegment next; &amp;lt;var&amp;gt;asegpos ; asegid ; range ; attrexpr1 ; ... &amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result: position &amp;lt;var&amp;gt;asegpos&amp;lt;/var&amp;gt; of first / next matching segment or empty string&lt;br /&gt;
;Description: The find &amp;lt;code&amp;gt;first/next&amp;lt;/code&amp;gt; function can be used to process audio segments in an interation loop. If a call to &amp;lt;code&amp;gt;next&amp;lt;/code&amp;gt; fails (no more matching segments found), the position &amp;lt;var&amp;gt;asegpos&amp;lt;/var&amp;gt; passed to function is cleared automatically. If an iteration loop is leaved before the last segment was processed, the &amp;lt;code&amp;gt;reset&amp;lt;/code&amp;gt; variant must be called to clear the last saved position.&lt;br /&gt;
&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset findsegment all|directory; &amp;lt;var&amp;gt;aset ; asegid ; range ; attrexpr1 ; ... &amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result: For &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; a simple table containing the xml positions of all found segments is returned. For &amp;lt;code&amp;gt;directory&amp;lt;/code&amp;gt; the function returns an extended table containing the id, begin, length and channel assignment (fields: ID, P, L and CH). If the function fails or no matching elements were found, it returns an empty string.&lt;br /&gt;
&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset findsegment reset; &amp;lt;var&amp;gt;table|asegpos ; delete=0&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result: none (void)&lt;br /&gt;
;Description: This function variant clears the position &amp;lt;var&amp;gt;asegpos&amp;lt;/var&amp;gt; or the segments positions stored in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;. If &amp;lt;var&amp;gt;delete&amp;lt;/var&amp;gt; is set to &#039;&#039;&#039;1&#039;&#039;&#039; also the segments themselves are deleted. It must be called to reset the segment position if an iteration loop is left early and to reset positions of segments found by the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; variant.&lt;br /&gt;
&lt;br /&gt;
;Arguments:&lt;br /&gt;
:;&amp;lt;var&amp;gt;aset&amp;lt;/var&amp;gt;: audio set reference (iref or position)&lt;br /&gt;
:;&amp;lt;var&amp;gt;asegid&amp;lt;/var&amp;gt;: segment name (wildcard)&lt;br /&gt;
:;&amp;lt;var&amp;gt;asegpos&amp;lt;/var&amp;gt;: segment element position&lt;br /&gt;
:;&amp;lt;var&amp;gt;range&amp;lt;/var&amp;gt;: segment expression defining the search range (* = whole audio set)&lt;br /&gt;
:;&amp;lt;var&amp;gt;attrexpr&amp;lt;/var&amp;gt;: an attribute compare expression (see [[Programmer_Guide/Shell_Items/File/SET_FILE#XML:_FIND|SET xmlfileitem FIND]])&lt;br /&gt;
:;&amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;:	a simple table with segment element positions (returned by &amp;lt;code&amp;gt;ALL&amp;lt;/code&amp;gt;)&lt;br /&gt;
:;&amp;lt;var&amp;gt;delete&amp;lt;/var&amp;gt;: &#039;&#039;&#039;1&#039;&#039;&#039; if element(s) should be deleted on RESET, &#039;&#039;&#039;0&#039;&#039;&#039; otherwise&lt;br /&gt;
&lt;br /&gt;
===DialogSelectSegment===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset dialogselectsegment &amp;lt;var&amp;gt;title ; aset ; mode ; output&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;: dialog capture, empty string to use default title&lt;br /&gt;
:;&amp;lt;var&amp;gt;aset&amp;lt;/var&amp;gt;: audio set reference (iref)&lt;br /&gt;
:;&amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;: selection mode; &#039;&#039;&#039;single&#039;&#039;&#039; for one segment, &#039;&#039;&#039;multiple&#039;&#039;&#039; for multiple segments&lt;br /&gt;
:;&amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;: return value(s); &#039;&#039;&#039;positioon&#039;&#039;&#039; = xml position of segment(s), &#039;&#039;&#039;iref&#039;&#039;&#039; xml reference (iref) of segment(s), &#039;&#039;&#039;id&#039;&#039;&#039; segment id&lt;br /&gt;
;Result: &lt;br /&gt;
::* empty string if failed/canceled&lt;br /&gt;
::* if &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; = &#039;&#039;&#039;single&#039;&#039;&#039; &amp;amp;rarr; the specified return value as string&lt;br /&gt;
::* if &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; = &#039;&#039;&#039;multiple&#039;&#039;&#039; &amp;amp;rarr; a simple table with one entry for each selected segment holding the specified output value as string&lt;br /&gt;
;Description: This function displayes a dialog with a segment list of the specified audio set, where the user can select segment(s).&lt;br /&gt;
&lt;br /&gt;
===DialogEditSegment===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset dialogeditsegment &amp;lt;var&amp;gt;aset ; aseg ; segment ; channel ; title&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;aset&amp;lt;/var&amp;gt;: audio set reference (iref)&lt;br /&gt;
:;&amp;lt;var&amp;gt;aseg&amp;lt;/var&amp;gt;: segment reference, segment id or * (for new segments)&lt;br /&gt;
:;&amp;lt;var&amp;gt;segment&amp;lt;/var&amp;gt;: segment expression specifying both boundaries of segment or *&lt;br /&gt;
:;&amp;lt;var&amp;gt;channel&amp;lt;/var&amp;gt;: channel of segment or 0 for all channels&lt;br /&gt;
:;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;: dialog capture, empty string to use default title&lt;br /&gt;
;Result: empty string if failed/canceled or id of changed/created segment&lt;br /&gt;
;Description: This function implements a complex dialog to create new segments and to edit properties/attributes of segments.&lt;br /&gt;
&lt;br /&gt;
===CreateWave===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset createwave &amp;lt;var&amp;gt;aset ; aseg ; channels=* ; mode=single&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;aset&amp;lt;/var&amp;gt;: audio set reference (iref or position)&lt;br /&gt;
:;&amp;lt;var&amp;gt;aseg&amp;lt;/var&amp;gt;: specifies the segment (begin and end) to be addressed by the created wave item&lt;br /&gt;
::* a segment reference (iref or position), a segment id or a segment expression&lt;br /&gt;
::* the character &#039;&#039;&#039;*&#039;&#039;&#039; can be used to address the signal of the whole sound file&lt;br /&gt;
::* the expression &#039;&#039;&#039;*&#039;&#039;&#039;&amp;lt;var&amp;gt;length&amp;lt;/var&amp;gt; can be used to create a wave item that appends a signal of duration &amp;lt;var&amp;gt;length&amp;lt;/var&amp;gt; to a sound file&lt;br /&gt;
:;&amp;lt;var&amp;gt;channels&amp;lt;/var&amp;gt;: defines which channels of the audio set should be addressed by the created wave item&lt;br /&gt;
::* &#039;&#039;&#039;*&#039;&#039;&#039; or &#039;&#039;&#039;0&#039;&#039;&#039; for all channels&lt;br /&gt;
::* use keyword &#039;&#039;&#039;channels&#039;&#039;&#039; (or &#039;&#039;&#039;ch&#039;&#039;&#039;) to retrieve channel value from the attribute &#039;&#039;&#039;CH&#039;&#039;&#039; of the segment element&lt;br /&gt;
::* specify a channel number (1, 2, ..) or a list of blank separated channel numbers (e.g. &#039;&#039;&#039;1 3 4&#039;&#039;&#039;)&lt;br /&gt;
:;&amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;: this argument is only used, if the specified audio set is a sequence (ASequence)&lt;br /&gt;
::* set &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; to &#039;&#039;&#039;single&#039;&#039;&#039; if the signal is processed sequential&lt;br /&gt;
::* is the signal is accessed in a random way, set &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; to &#039;&#039;&#039;multiple&#039;&#039;&#039;&lt;br /&gt;
;Return: the created wave item (item id) or an empty string if the function fails&lt;br /&gt;
;Description: This function creates a wave item which can be used to read, write or append a signal from/to an audio set of the current project. A wave item created by this function must be deleted by calling the member function &amp;lt;code&amp;gt;DeleteWave&amp;lt;/code&amp;gt;. All wave items created by this member, are automatically deleted by the {{STx}} application management functions, when the shell exits.&lt;br /&gt;
&lt;br /&gt;
===CreateWaveEx===&lt;br /&gt;
This function takes the same arguments and performs the same function as &amp;lt;code&amp;gt;CreateWave&amp;lt;/code&amp;gt;. Only the result is different.&lt;br /&gt;
;Result: the created wave item or a numeric error code&lt;br /&gt;
&lt;br /&gt;
===DeleteWave===&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;$bdataset deletewave &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt;: id of waveitem to be deleted&lt;br /&gt;
;Result: no result (void)&lt;br /&gt;
;Description: This function deletes the wave item and performs all necessary cleanup operations (e.g. delete assoziated items, close used soundfiles, etc.). Use this function only to delete wave items created with &amp;lt;code&amp;gt;CreateWave/CreateWaveEx&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Uncommon Functions and Functions for internal use only==&lt;br /&gt;
&lt;br /&gt;
The following functions are not often used and not so important for user script programming. If you want to know more about these functions look at the comments in the source file &#039;&#039;&#039;BDataSet.stx&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;GetBaseDirecory(read: #filepath)&amp;lt;/code&amp;gt;: used by member &amp;lt;code&amp;gt;Save&amp;lt;/code&amp;gt; to verify the project file path&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;BackupSave&amp;lt;/code&amp;gt;: create a backup copy of the current project if backups are enabled; this function is called by the members &amp;lt;code&amp;gt;Save/Load&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;BackupEmpty&amp;lt;/code&amp;gt;: empty backup directory - delete all backups&lt;br /&gt;
* &amp;lt;code&amp;gt;BackupLoad&amp;lt;/code&amp;gt;: display a list of available backups including options to restore selected backups&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;ImportXML(read: #filepath; #set=*; #id=*)&amp;lt;/code&amp;gt;: import the content of a xml file into the project (e.g. merge projects)&lt;br /&gt;
* &amp;lt;code&amp;gt;ImportSD0(read: afileref=*)&amp;lt;/code&amp;gt;: import segment metadata of the specified (selected) audio set; try all versions (stxsm/sd0/st5); this function is used to load segment metadata of linked projects&lt;br /&gt;
* &amp;lt;code&amp;gt;ExportSD0(read: afileref=* [xmlfile])&amp;lt;/code&amp;gt;: export segment metadata of the specified (selected) audio set;  this function is used to save segment metadata of linked projects&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;SetSetting(read: #id; version; value)&amp;lt;/code&amp;gt;: set the value of project setting &#039;#id&#039; in the STXDataSet/Settings element&lt;br /&gt;
* &amp;lt;code&amp;gt;GetSetting(read: #id; version)&amp;lt;/code&amp;gt;: get the valud of project setting &#039;#id&#039; from STXDataSet/Settings element&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;GetWaveInfo(read: waveitem)&amp;lt;/code&amp;gt;: retrieve all information associated to a wave item (created with member CreateWave)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;MakeChannelList(read: nch|aset; withall)&amp;lt;/code&amp;gt;: initialize a channel-list variable for dialogs (combobox)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;GetReservedAttributes&amp;lt;/code&amp;gt;: returns a blank seperated list of all reserved attribute names&lt;br /&gt;
* &amp;lt;code&amp;gt;IsReservedAttribute(read: attrname)&amp;lt;/code&amp;gt;: returns 1 if the argument attrname is the name a reserved attribute and 0 otherwise&lt;br /&gt;
* &amp;lt;code&amp;gt;GetAttributes(read: type table autoexclude excludelist)&amp;lt;/code&amp;gt;: returns a list of all attributes assigned to elements of the specified; the whole project is scanned&lt;br /&gt;
* &amp;lt;code&amp;gt;DialogGetAttributes(read: type vlist)&amp;lt;/code&amp;gt;: implements a dialog to select visible attributes of the selected element type (e.g. sets, segments, ...); returns a blank separated list of visible attributes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;GetTemplateForCurrentTag&amp;lt;/code&amp;gt;: get the template assigned to the current element (or its parent if possible)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;AttrListView&amp;lt;/code&amp;gt;: a special handler for attribute editors (controls a dialog via msg. handling and callback); used by some standard dialogs of the GUI&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/rpoly&amp;diff=10696</id>
		<title>Programmer Guide/Command Reference/EVAL/rpoly</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/rpoly&amp;diff=10696"/>
		<updated>2023-05-15T08:41:13Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Evaluate polynom with real coefficients.&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;rpoly(&amp;lt;var&amp;gt;a&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)&amp;lt;/code&amp;gt;:&lt;br /&gt;
:;&amp;lt;var&amp;gt;a&amp;lt;/var&amp;gt;: a vector containing the polynom coefficients&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;: a scalar, vector or matrix&lt;br /&gt;
;Result: The result &#039;&#039;y&#039;&#039; has the same type as &#039;&#039;x&#039;&#039;.&lt;br /&gt;
::&amp;lt;code&amp;gt;&#039;&#039;y&#039;&#039;[i,j] = &#039;&#039;a&#039;&#039;[0] + &#039;&#039;a&#039;&#039;[1]*&#039;&#039;x&#039;&#039;[i,j] + &#039;&#039;a&#039;&#039;[2]*&#039;&#039;x&#039;&#039;[i,j]^2 + ... + &#039;&#039;a&#039;&#039;[m]*&#039;&#039;x&#039;&#039;[i,j]^m&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;with: m = polynom order = ncol(&#039;&#039;a&#039;&#039;)-1&amp;lt;/code&amp;gt;&lt;br /&gt;
;See also: [[../rpolyreg|rpolyreg]], [[../interp|interp]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/rpoly&amp;diff=10695</id>
		<title>Programmer Guide/Command Reference/EVAL/rpoly</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/rpoly&amp;diff=10695"/>
		<updated>2023-05-15T08:40:35Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Evaluate polynom with real coefficients.&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;rpoly(&amp;lt;var&amp;gt;a&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)&amp;lt;/code&amp;gt;:&lt;br /&gt;
:;&amp;lt;var&amp;gt;a&amp;lt;/var&amp;gt;: a vector containing the polynom coefficients&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;: a vector or a number&lt;br /&gt;
;Result: The result &#039;&#039;y&#039;&#039; has the same type as &#039;&#039;x&#039;&#039;.&lt;br /&gt;
::&amp;lt;code&amp;gt;&#039;&#039;y&#039;&#039;[i,j] = &#039;&#039;a&#039;&#039;[0] + &#039;&#039;a&#039;&#039;[1]*&#039;&#039;x&#039;&#039;[i,j] + &#039;&#039;a&#039;&#039;[2]*&#039;&#039;x&#039;&#039;[i,j]^2 + ... + &#039;&#039;a&#039;&#039;[m]*&#039;&#039;x&#039;&#039;[i,j]^m&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;with: m = polynom order = ncol(&#039;&#039;a&#039;&#039;)-1&amp;lt;/code&amp;gt;&lt;br /&gt;
;See also: [[../rpolyreg|rpolyreg]], [[../interp|interp]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/rpoly&amp;diff=10694</id>
		<title>Programmer Guide/Command Reference/EVAL/rpoly</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/rpoly&amp;diff=10694"/>
		<updated>2023-05-15T08:39:57Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Evaluate polynom with real coefficients.&lt;br /&gt;
;Usage: &amp;lt;code&amp;gt;rpoly(&amp;lt;var&amp;gt;a&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)&amp;lt;/code&amp;gt;:&lt;br /&gt;
:;&amp;lt;var&amp;gt;a&amp;lt;/var&amp;gt;: a vector containing the polynom coefficients&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;: a scalar, vector or number&lt;br /&gt;
;Result: The result &#039;&#039;y&#039;&#039; has the same type as &#039;&#039;x&#039;&#039;.&lt;br /&gt;
::&amp;lt;code&amp;gt;&#039;&#039;y&#039;&#039;[i,j] = &#039;&#039;a&#039;&#039;[0] + &#039;&#039;a&#039;&#039;[1]*&#039;&#039;x&#039;&#039;[i,j] + &#039;&#039;a&#039;&#039;[2]*&#039;&#039;x&#039;&#039;[i,j]^2 + ... + &#039;&#039;a&#039;&#039;[m]*&#039;&#039;x&#039;&#039;[i,j]^m&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;with: m = polynom order = ncol(&#039;&#039;a&#039;&#039;)-1&amp;lt;/code&amp;gt;&lt;br /&gt;
;See also: [[../rpolyreg|rpolyreg]], [[../interp|interp]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Waveform_and_Segmentation_Viewer&amp;diff=10681</id>
		<title>User Guide/Waveform and Segmentation Viewer</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Waveform_and_Segmentation_Viewer&amp;diff=10681"/>
		<updated>2020-11-25T08:29:02Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{V1}}&lt;br /&gt;
The {{Viewer1}} plots the waveform of the selected signal and is most often used to segment sound files. In {{STX}} 5.0.0, basic signal editing capabilities were added. &lt;br /&gt;
&lt;br /&gt;
The [[User_Guide/SPExL/Transcription_Script|Transcription Script]] is a more recent alternative for segmentation.&lt;br /&gt;
&lt;br /&gt;
[[File:v1_overview.png]]&lt;br /&gt;
&lt;br /&gt;
==Overview Graph==&lt;br /&gt;
&lt;br /&gt;
{{/Overview_Graph}}&lt;br /&gt;
&lt;br /&gt;
==Segment Line Graphs==&lt;br /&gt;
&lt;br /&gt;
{{/Segment_Line_Graphs}}&lt;br /&gt;
&lt;br /&gt;
==Zoom Graphs==&lt;br /&gt;
&lt;br /&gt;
{{/Zoom_Graphs}}&lt;br /&gt;
&lt;br /&gt;
==Control Dialog==&lt;br /&gt;
&lt;br /&gt;
{{/Control_Dialog}}&lt;br /&gt;
&lt;br /&gt;
The following unsorted topics are currently available:&lt;br /&gt;
&lt;br /&gt;
==Waveform and Segmentation Viewer Dialogs==&lt;br /&gt;
&lt;br /&gt;
{{/Waveform_and_Segmentation_Viewer_Dialogs|}}&lt;br /&gt;
&lt;br /&gt;
==Zooming==&lt;br /&gt;
&lt;br /&gt;
{{/Zooming}}&lt;br /&gt;
&lt;br /&gt;
==Playback==&lt;br /&gt;
&lt;br /&gt;
{{/Playback}}&lt;br /&gt;
&lt;br /&gt;
==Pre-Configured Profiles==&lt;br /&gt;
&lt;br /&gt;
{{/Pre-Configured_Profiles}}&lt;br /&gt;
&lt;br /&gt;
==General Settings Dialog==&lt;br /&gt;
&lt;br /&gt;
{{/General_Settings_Dialog}}&lt;br /&gt;
&lt;br /&gt;
==Segment Markers Dialog==&lt;br /&gt;
&lt;br /&gt;
{{/Segment_Markers_Dialog}}&lt;br /&gt;
&lt;br /&gt;
==Profile Settings Dialog==&lt;br /&gt;
&lt;br /&gt;
{{/Profile_Settings_Dialog_(Waveform_and_Segmentation_Viewer)}}&lt;br /&gt;
&lt;br /&gt;
==Segments Dialog==&lt;br /&gt;
&lt;br /&gt;
{{/Segments_Dialog}}&lt;br /&gt;
&lt;br /&gt;
==Cue-Points Dialog==&lt;br /&gt;
&lt;br /&gt;
{{/Cue-Points_Dialog}}&lt;br /&gt;
&lt;br /&gt;
[[User_Guide/Waveform_and_Segmentation_Viewer/Waveform_and_Segmentation_Viewer_Hotkeys|Hotkeys]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Recorder&amp;diff=10680</id>
		<title>User Guide/Recorder</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Recorder&amp;diff=10680"/>
		<updated>2020-11-24T11:54:51Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Recorder}}&lt;br /&gt;
{{TODO}}&lt;br /&gt;
The Recorder application can be used to record signals from the available MME analog and digital inputs on your system, saving these signals to wave files. Whilst recording, you can set tags, which you can later convert to segments. You can also tag and segment in the graph once recording is finished.&lt;br /&gt;
&lt;br /&gt;
[[File:recorder.png]]&lt;br /&gt;
&lt;br /&gt;
Note that once you saved the signal, further playback and segmentation must be carried out in the [[User_Guide/Workspace|Workspace]] and Viewers (e.g. the [[User_Guide/Waveform_and_Segmentation_Viewer/Waveform_and_Segmentation_Viewer|Waveform and segmentation viewer]]). The {{STX}} Recorder PPM bars only work under Windows XP and under those Windows versions where it works like under Windows XP. If you are running Windows 2000, you will not be able to show the PPM bars and record at the same time. The Real-Time Analyser will also not display correctly while recording. We are working on removing this automatically.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contents&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[User_Guide/Recorder/Setup_Dialog|Setup Dialog]]&lt;br /&gt;
&lt;br /&gt;
[[User_Guide/Recorder/Tagging|Tagging]]&lt;br /&gt;
&lt;br /&gt;
[[User_Guide/Copy_or_Print_Dialog|Copy/Print Dialog]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/avr&amp;diff=10678</id>
		<title>Programmer Guide/Command Reference/EVAL/avr</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/avr&amp;diff=10678"/>
		<updated>2020-01-29T07:59:23Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:avr (alias: avg)}}&lt;br /&gt;
The arithmetic mean function is implemented in two versions.&lt;br /&gt;
----&lt;br /&gt;
;Usage 1: &amp;lt;code&amp;gt;avr(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;: a scalar, vector or matrix&lt;br /&gt;
;Result 1: The result is the arithmetic mean of all elements of &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
;Usage 2: &amp;lt;code&amp;gt;avr(&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;flag&amp;lt;/var&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;: a matrix&lt;br /&gt;
:;&amp;lt;var&amp;gt;flag&amp;lt;/var&amp;gt;: compute mean of the column vectors (&#039;&#039;flag&#039;&#039;=0) or the row vectors (&#039;&#039;flag&#039;&#039;&amp;amp;ne;0) is requsted; &#039;&#039;flag&#039;&#039; must be a scalar&lt;br /&gt;
;Result 2: &lt;br /&gt;
:*if &#039;&#039;flag&#039;&#039;=0: the result &#039;&#039;r&#039;&#039; is the vector of the column means&lt;br /&gt;
:::&amp;lt;code&amp;gt;&#039;&#039;r&#039;&#039;[&#039;&#039;i&#039;&#039;] = eval avr( &#039;&#039;x&#039;&#039;[*,&#039;&#039;i&#039;&#039;], 0) // &#039;&#039;i&#039;&#039; = 0 .. ncol(&#039;&#039;x&#039;&#039;)-1&amp;lt;/code&amp;gt;&lt;br /&gt;
:*otherwise: the result &#039;&#039;r&#039;&#039; is the vector of the row means&lt;br /&gt;
:::&amp;lt;code&amp;gt;&#039;&#039;r&#039;&#039;[&#039;&#039;i&#039;&#039;] = eval avr( &#039;&#039;x&#039;&#039;[&#039;&#039;i&#039;&#039;,*], 1) // &#039;&#039;i&#039;&#039; = 0 .. nrow(&#039;&#039;x&#039;&#039;)-1&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
;See also: [[../median|median]], [[../var|var]], [[../dev|dev]], [[../corr|corr]], [[../sum|sum]], [[../hist|hist]],&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/CHECKIT&amp;diff=10330</id>
		<title>Programmer Guide/Command Reference/CHECKIT</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/CHECKIT&amp;diff=10330"/>
		<updated>2019-01-31T10:57:24Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
 var := CHECKIT arg [option]&lt;br /&gt;
with &amp;lt;code&amp;gt;option&amp;lt;/code&amp;gt; being either empty, in which case the type of the shell item or of the sourcecode item &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; will be returned, or one out of the following keywords:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!option!!description!!result on success!!result on failure&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Trace&amp;lt;/code&amp;gt;&lt;br /&gt;
|returns a semicolon seperated list of the call stack at the current line; &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; can be the number of levels (including current level) or the name of a macro where the traceback should stop&lt;br /&gt;
| &amp;lt;var&amp;gt;shellid; macro:line; macro:line; ...&amp;lt;/var&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Executable&amp;lt;/code&amp;gt;&lt;br /&gt;
|check if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is executable, i.e., if it is a command, instance, macro, or class&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is executable&lt;br /&gt;
| &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; otherwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Item&amp;lt;/code&amp;gt;&lt;br /&gt;
| get type of the shell item &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| type of the shell item (cf. [[Programmer_Guide/Shell_Items|shell item types]]) if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a shell item&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Code&amp;lt;/code&amp;gt;&lt;br /&gt;
| get type of the source code &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;macro&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;spu&amp;lt;/code&amp;gt; if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a source code macro, class, or SPU.&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Visible&amp;lt;/code&amp;gt;&lt;br /&gt;
| check if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a visible source code&lt;br /&gt;
| 1 if it is&lt;br /&gt;
| 0 if it is not&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/File&amp;lt;/code&amp;gt;&lt;br /&gt;
| get full sourcefile path of source code &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| full path if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a source code&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Style&amp;lt;/code&amp;gt;&lt;br /&gt;
| get style of sourcecode &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;shell&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sys&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;msgHandler&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;global&amp;lt;/code&amp;gt; if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a source code of the respective type.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;global&amp;lt;/code&amp;gt; is the default codestyle if none is specified in the code header&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|-&lt;br /&gt;
| no option at all&lt;br /&gt;
| get type of shell item or source code &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| item type (cf. [[Programmer_Guide/Shell_Items|shell item types]]) or code type (&amp;lt;code&amp;gt;macro&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;spu&amp;lt;/code&amp;gt;) if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a shell item, or a source code&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/CHECKIT&amp;diff=10329</id>
		<title>Programmer Guide/Command Reference/CHECKIT</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/CHECKIT&amp;diff=10329"/>
		<updated>2019-01-31T10:56:10Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
 var := CHECKIT arg [option]&lt;br /&gt;
with &amp;lt;code&amp;gt;option&amp;lt;/code&amp;gt; being either empty, in which case the type of the shell item or of the sourcecode item &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; will be returned, or one out of the following keywords:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!option!!description!!result on success!!result on failure&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Trace&amp;lt;/code&amp;gt;&lt;br /&gt;
|returns a semicolon seperated list of the call stack at the current line; &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; can be the number of levels (including current level) or the name of a macro where the traceback shold stop&lt;br /&gt;
| &amp;lt;var&amp;gt;shellid; macro:line; macro:line; ...&amp;lt;/var&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Executable&amp;lt;/code&amp;gt;&lt;br /&gt;
|check if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is executable, i.e., if it is a command, instance, macro, or class&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is executable&lt;br /&gt;
| &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; otherwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Item&amp;lt;/code&amp;gt;&lt;br /&gt;
| get type of the shell item &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| type of the shell item (cf. [[Programmer_Guide/Shell_Items|shell item types]]) if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a shell item&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Code&amp;lt;/code&amp;gt;&lt;br /&gt;
| get type of the source code &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;macro&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;spu&amp;lt;/code&amp;gt; if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a source code macro, class, or SPU.&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Visible&amp;lt;/code&amp;gt;&lt;br /&gt;
| check if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a visible source code&lt;br /&gt;
| 1 if it is&lt;br /&gt;
| 0 if it is not&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/File&amp;lt;/code&amp;gt;&lt;br /&gt;
| get full sourcefile path of source code &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| full path if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a source code&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Style&amp;lt;/code&amp;gt;&lt;br /&gt;
| get style of sourcecode &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;shell&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sys&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;msgHandler&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;global&amp;lt;/code&amp;gt; if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a source code of the respective type.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;global&amp;lt;/code&amp;gt; is the default codestyle if none is specified in the code header&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|-&lt;br /&gt;
| no option at all&lt;br /&gt;
| get type of shell item or source code &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| item type (cf. [[Programmer_Guide/Shell_Items|shell item types]]) or code type (&amp;lt;code&amp;gt;macro&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;spu&amp;lt;/code&amp;gt;) if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a shell item, or a source code&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/CHECKIT&amp;diff=10328</id>
		<title>Programmer Guide/Command Reference/CHECKIT</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/CHECKIT&amp;diff=10328"/>
		<updated>2019-01-31T10:54:47Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
 var := CHECKIT arg [option]&lt;br /&gt;
with &amp;lt;code&amp;gt;option&amp;lt;/code&amp;gt; being either empty, in which case the type of the shell item or of the sourcecode item &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; will be returned, or one out of the following keywords:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!option!!description!!result on success!!result on failure&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Trace&amp;lt;/code&amp;gt;&lt;br /&gt;
|returns a semicolon seperated list of the call stack at the current line; &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; can be a number of levels (including current level) or the name a macro to break the traceback &lt;br /&gt;
| &amp;lt;var&amp;gt;shellid; macro:line; macro:line; ...&amp;lt;/var&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Executable&amp;lt;/code&amp;gt;&lt;br /&gt;
|check if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is executable, i.e., if it is a command, instance, macro, or class&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is executable&lt;br /&gt;
| &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; otherwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Item&amp;lt;/code&amp;gt;&lt;br /&gt;
| get type of the shell item &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| type of the shell item (cf. [[Programmer_Guide/Shell_Items|shell item types]]) if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a shell item&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Code&amp;lt;/code&amp;gt;&lt;br /&gt;
| get type of the source code &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;macro&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;spu&amp;lt;/code&amp;gt; if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a source code macro, class, or SPU.&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Visible&amp;lt;/code&amp;gt;&lt;br /&gt;
| check if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a visible source code&lt;br /&gt;
| 1 if it is&lt;br /&gt;
| 0 if it is not&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/File&amp;lt;/code&amp;gt;&lt;br /&gt;
| get full sourcefile path of source code &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| full path if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a source code&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Style&amp;lt;/code&amp;gt;&lt;br /&gt;
| get style of sourcecode &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;shell&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sys&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;msgHandler&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;global&amp;lt;/code&amp;gt; if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a source code of the respective type.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;global&amp;lt;/code&amp;gt; is the default codestyle if none is specified in the code header&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|-&lt;br /&gt;
| no option at all&lt;br /&gt;
| get type of shell item or source code &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt;&lt;br /&gt;
| item type (cf. [[Programmer_Guide/Shell_Items|shell item types]]) or code type (&amp;lt;code&amp;gt;macro&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;spu&amp;lt;/code&amp;gt;) if &amp;lt;var&amp;gt;arg&amp;lt;/var&amp;gt; is a shell item, or a source code&lt;br /&gt;
| empty string otherwise&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Table/SET_TABLE&amp;diff=10325</id>
		<title>Programmer Guide/Shell Items/Table/SET TABLE</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Table/SET_TABLE&amp;diff=10325"/>
		<updated>2019-01-30T09:30:52Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* {{anchor|FIND|Finding table entries}} */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Table_Item_Template}}&lt;br /&gt;
The &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&amp;amp;hellip;&amp;lt;/code&amp;gt; command is used to modify a table item. The sub-commands documented here are valid for all table types, unless otherwise specified.&lt;br /&gt;
&lt;br /&gt;
== Setting or Adding table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;amp;hellip; [ /Tag | /Untag ]&lt;br /&gt;
&lt;br /&gt;
When using the index of an &#039;&#039;existing&#039;&#039; entry for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, the command will modify the respective entry. When supplying the asterisk, &amp;amp;quot;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&amp;amp;quot;, for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, a &#039;&#039;new entry&#039;&#039; will be appended to the end of the table. Finally, when supplying a value for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; that is &#039;&#039;greater&#039;&#039; than the number of entries (&amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt;), the table will be padded with an appropriate number of empty entries in order to allow the entry &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to be set.&lt;br /&gt;
&lt;br /&gt;
The options &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt; may be used for setting or clearing the tag flag.&lt;br /&gt;
&lt;br /&gt;
Remember that with {{STX}} table indexes are always zero-based.&lt;br /&gt;
&lt;br /&gt;
=== Unstructured adding ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt; [ /Tag|Untag ]&lt;br /&gt;
&lt;br /&gt;
This statement is the sole way of adding entries to a simple table. The statement is applicable to extended tables, too. With extended tables, the field separator character may be used to separate fields in the string &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt;, meaning that &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt; will be parsed in the same way as entries are loaded from files.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The zero-based index of an existing entry to modify the entry&#039;s data or a zero-based index greater than the number of existing entries, to add a new entry. If the index is greater than the total number of entries, then all missing entries are created and initialized with default values. An asterisk may be used to append the table with a new entry at the next free index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt;&lt;br /&gt;
| The value to assign to the entry.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt;&lt;br /&gt;
| tag, or untag, the respective entry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Adding structured data to extended tables ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Tag|Untag ] [ /N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;|all|tagged ]&lt;br /&gt;
&lt;br /&gt;
The structured variant of setting entries allows to address the fields of an entry. It is thus applicable to extended tables only. Using the option &amp;lt;code&amp;gt;/N&amp;lt;/code&amp;gt;, you may even set multiple entries at the same time.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The zero-based index of an existing entry to modify the entry&#039;s data or a zero-based index greater than the number of existing entries, to add a new entry. If the index is greater than the total number of entries, then all missing entries are created and initialized with default values. An asterisk may be used to append the table with a new entry at the next free index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&amp;amp;hellip;&lt;br /&gt;
| A valid field id (as defined in the &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW TABLE]]&amp;lt;/code&amp;gt; command) or a field index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&amp;amp;hellip;&lt;br /&gt;
| The value to assign to the respective field.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt;&lt;br /&gt;
| tag, or untag, the respective entry&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Repeat this assignment for the next &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; entries (with &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; being an integer higher than, or equal to, 1), or for &#039;&#039;all&#039;&#039; entries from the current one to the last one (with &amp;lt;code&amp;gt;/N=all&amp;lt;/code&amp;gt;), or for all tagged entries from the current one to the last one (&amp;lt;code&amp;gt;/N=tagged&amp;lt;/code&amp;gt;). Note that the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tagged&amp;lt;/code&amp;gt; variants cannot append new entries to the table. Note also that you cannot set &#039;all&#039; entries, if only tagged entries are currently visible.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 // initialize the first field of the first 10 entries with the value 0.&lt;br /&gt;
 $#extTable 0 0 0 /N=10&lt;br /&gt;
&lt;br /&gt;
== Retrieving a table entry ==&lt;br /&gt;
&lt;br /&gt;
You can retrieve a table entry using the following syntax: &amp;lt;code&amp;gt;$#table[$#index]&amp;lt;/code&amp;gt;. If the table has columns defined, you can use the syntax &amp;lt;samp&amp;gt;$#table[$#index,$#columnid]&amp;lt;/samp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Configuring a table field==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET table CONFIG&amp;lt;/code&amp;gt; command is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]] (after all, [[Programmer_Guide/Concepts/Simple_table|simple tables]] do not have fields).&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CONFIG &amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mmode&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mval&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;header&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;align&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;sort&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt;&lt;br /&gt;
                          [ &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;setuserdefault&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;multirow&amp;lt;/var&amp;gt; ] ]&lt;br /&gt;
&lt;br /&gt;
Configure a table field. Define the display format (list box and list view) and field properties. The field must have been specified in the &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Table/NEW_TABLE|NEW TABLE]]&amp;lt;/code&amp;gt; command. The table must be in configuration mode (see &amp;lt;code&amp;gt;[[#Setting_the_table_mode|MODE]]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name or index of the field to be configured / updated.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt;&lt;br /&gt;
| Show (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or hide (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) the field in listbox and list view controls&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;&lt;br /&gt;
| Show both name and value (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or value only (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) in list box controls. This is only effective if &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt;&lt;br /&gt;
| The scaling factor for numeric fields; if a numeric field is accessed in the [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Show_Format|show format]], its value is multiplied with scale (used by both listboxes and listviews).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
| The [[Programmer Guide/Shell Items/Table/Show_Format|show format]] format string.&lt;br /&gt;
&lt;br /&gt;
For fields of type &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;, the format must contain a string tag (e.g.: &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%10.10s&amp;lt;/code&amp;gt;) For both numeric field types (&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;), the format must contain a float tag (&amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%g&amp;lt;/code&amp;gt;). The float tag is necessary for integer values because the scaling factor (&amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt;) is a floating number.&lt;br /&gt;
&lt;br /&gt;
Note that to display an integer (without decimals) you can use the format tag &amp;lt;code&amp;gt;%5.0f&amp;lt;/code&amp;gt;. This parameter controls the format for listboxes and listviews dialog controls.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mmode&amp;lt;/var&amp;gt;&lt;br /&gt;
| Enable (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or disable (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) missing value replacement. Missing value replacement is disabled by default. If enabled, missing values are replaced by &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mval&amp;lt;/var&amp;gt;&lt;br /&gt;
| The numeric id value of a &#039;missing value&#039; (e.g. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for f0 data). The default is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Missing value replacement only works for numerical fields (&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt;&lt;br /&gt;
| The replacement symbol (string) for missing values (e.g. &amp;lt;code&amp;gt;UNVOICED&amp;lt;/code&amp;gt; for f0 data). The strings &amp;lt;code&amp;gt;&amp;lt;empty&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;blank&amp;gt;&amp;lt;/code&amp;gt; can be used to replace a missing value with an empty string or a blank character. The default string is the empty string.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;header&amp;lt;/var&amp;gt;&lt;br /&gt;
| The text to be displayed in the field&#039;s column header of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width (in characters) of the column of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;align&amp;lt;/var&amp;gt;&lt;br /&gt;
| Align field left (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) or right (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;) in the column of a listview control; The first column of a listview is always. left-aligned (align is ignored)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;sort&amp;lt;/var&amp;gt;&lt;br /&gt;
| Enable (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;) or disable (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) the sort function of the column header of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt;&lt;br /&gt;
| If &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt; is set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, the respective field (column) of the table is NOT editable when the table is connected to a &amp;lt;code&amp;gt;ListView&amp;lt;/code&amp;gt; item. If &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt; is set to a number different from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, the respective field (column) of the table IS editable when the table is connected to a &amp;lt;code&amp;gt;ListView&amp;lt;/code&amp;gt; item. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a table containing all permissible values for this field. If this table (&amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;) is connected to a &amp;lt;code&amp;gt;listview&amp;lt;/code&amp;gt; item, and the &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; parameter is specified, the &amp;lt;code&amp;gt;listview&amp;lt;/code&amp;gt; displays a combobox in the associated column, and fills the combobox with &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt;&#039;s values.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt;&lt;br /&gt;
| The field id specifying the field in &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; where the values are stored. If &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; is a simple table, &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt; must be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt; parameter specifies whether this &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&#039;s field may only use values in the list table (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;), or whether any values may be entered (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the combobox is editable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt; parameter specifies whether invalid or empty data entered whilst editing should be replaced by the default value (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;=yes, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;=no). The first value in the list table is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;setuserdefault&amp;lt;/var&amp;gt;&lt;br /&gt;
| If set to &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, the last user-input for this field will be used as the respective default value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;multirow&amp;lt;/var&amp;gt;&lt;br /&gt;
| If set to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;, the field can display text in multiple rows. If set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;, text will be displayed in one row. The default is &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A field is defined once, but can be configured as often as needed. If an argument is not supplied or set to &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039;, the configuration for that parameter is not changed.See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a detailed example.&lt;br /&gt;
&lt;br /&gt;
== Table-to-table Copy ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; COPY &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt; &amp;amp;hellip; ] [ /Rows /Columns ]&lt;br /&gt;
&lt;br /&gt;
Copy data from the source table &amp;lt;var&amp;gt;srcTable&amp;lt;/var&amp;gt; (a parameter table or an extended table) to the target table &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; (a table of the same kind). If fields (&amp;lt;var&amp;gt;fieldids&amp;lt;/var&amp;gt;) are specified, then only these fields are copied. Otherwise all fields of the source table are copied.&lt;br /&gt;
&lt;br /&gt;
If the command is called &#039;&#039;without&#039;&#039; supplying options &amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;), then&lt;br /&gt;
# the source table must have the &#039;&#039;same format&#039;&#039;, i.e. the same fields, as the target table; and&lt;br /&gt;
# the source entries will &#039;&#039;overwrite&#039;&#039; the target entries (appending entries if necessary).&lt;br /&gt;
&lt;br /&gt;
If the command is called with either option &amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;, the command will &#039;&#039;not&#039;&#039; overwrite existing entries and fields in the target table. Rather than that, the command will &#039;&#039;modify&#039;&#039; the target table, appending source fields (which do not exist in the target table) and entries to the target table. Note that the target table must have enough undefined fields to accommodate the appended fields (i.e. fields created by &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Table/NEW_TABLE|NEW TABLE]]&amp;lt;/code&amp;gt;, but yet undefined).&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;COPY&amp;lt;/code&amp;gt; command works only with extended and with parameter tables.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt;:The table to copy from. This must be an extended or parameter table.&lt;br /&gt;
;&amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt;: An optional list of field IDs, separated by blank. If specified, only these fields are copied. If omitted, all fields are copied.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt;: If specified, fields from &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; are appended to &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;. The fields being copied must already be defined in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;. Note that the field data type is not checked (i.e. number fields can be copied to string fields of the same name).&lt;br /&gt;
;&amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;: If specified, entries from &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; are copied to the &#039;&#039;same&#039;&#039; entries in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;, &#039;&#039;overwriting their old value&#039;&#039;. Fields not defined in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; are automatically defined and configured. For this reason there must be enough undefined fields in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Copying between a Table and a Value Item ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; COPY &amp;lt;var&amp;gt;outputName&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt; [ /Row|Col ] [ /Write ]&lt;br /&gt;
&lt;br /&gt;
Copy data between a table and a [[Programmer_Guide/Shell_Items/Value|value object]]. If the option &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; is used, the table data is copied to the value item, otherwise (default) the value item data is copied to the table.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;outputName&amp;lt;/var&amp;gt;: The name of a value item to copy to or from.&lt;br /&gt;
;&amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt;: The entry index.&lt;br /&gt;
;&amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;: The field index.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Row&amp;lt;/code&amp;gt;: Copy table fields starting at row &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt; field &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;. The number of fields copied is determined by the size of the vector. The number of rows copied is determined by the number of vectors (only for array value items). This option is only for array and vector value items.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Col&amp;lt;/code&amp;gt;: Copy table entries starting at row &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt;, field &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;. The number of rows copied is determined by the size of the vector. The number of fields copied is determined by the number of vectors (array value items). This option is only for array and vector value items.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;: If the option &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; is specified, the table data is copied to the value item. If omitted, the value item data is copied to the table.&lt;br /&gt;
&lt;br /&gt;
== Copying to and from the clipboard ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD [ /Show|Write ]&lt;br /&gt;
&lt;br /&gt;
Copy the visible entries of a table to the clipboard. The entries can be copied either in:&lt;br /&gt;
# [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Show_Format|show-format]], i.e. using listbox display format, when supplying the &amp;lt;code&amp;gt;/Show&amp;lt;/code&amp;gt; option (or no option at all, since this is the default); or in&lt;br /&gt;
# [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Write_Format|write-format]], i.e. the format normally used when writing to a file. This is done with the &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; option.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;/Show&amp;lt;/code&amp;gt;: Use the show format to format each entry string. This is the default.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;: Use the write format to format each entry string.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD /Args arg1 arg2 ... [ /Show|Write ]&lt;br /&gt;
&lt;br /&gt;
Copy the content of the arguments to the clipboard. Each argument &amp;lt;code&amp;gt;argI&amp;lt;/code&amp;gt; can be a string (string is copied) or a table item (content of table is copied). The option &amp;lt;code&amp;gt;/Show|Write&amp;lt;/code&amp;gt; specifies the output format used for the table items (as described above). The content of the table item &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; is only copied, if it is specified as argument.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD /Read [ /Delete ] [ /Empty ]&lt;br /&gt;
&lt;br /&gt;
Read the last entry from the clipboard. This will work only if the format of the respective clipboard entry is either Unicode (&amp;lt;code&amp;gt;CF_UNICODETEXT&amp;lt;/code&amp;gt;) or text (&amp;lt;code&amp;gt;CF_TEXT&amp;lt;/code&amp;gt;).&lt;br /&gt;
;&amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt;: Mandatory option.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Delete&amp;lt;/code&amp;gt;: Delete the table entries before reading from the clipboard.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Empty&amp;lt;/code&amp;gt;: Empty the clipboard after a successful read.&lt;br /&gt;
&lt;br /&gt;
== Defining a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;* type name&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;count offset&amp;lt;/var&amp;gt;] [/Auto] [/Undefine]&lt;br /&gt;
&lt;br /&gt;
Note that the table must be in configuration mode (see [[XXX|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]]). Define the data type and name of field &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; (0 .. number of fields - 1). If an asterisk &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039; is given instead of &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, the first free (undefined) index is used. The argument &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is the id of the data type of the field. The argument &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is the name to be assigned to the field and must be a valid name string. The parameters &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; can be used to define multiple fields with one command (&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; = number of fields, &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; = base index). The option /Auto ensures the name is unique by concatenating the string name with an index (first value: 1). Note that once you have configured the table, you need to switch to DATA mode (see [[XXX|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]] below).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE&amp;lt;/code&amp;gt; command is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]], since only they support different types of fields.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;: The index of the field to be defined or &#039;*&#039; for the next free index.&lt;br /&gt;
;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;: The type of data to be stored. The following values are supported:&lt;br /&gt;
:&amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; - Strings which are valid names.&lt;br /&gt;
:&amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt; - Free text.&lt;br /&gt;
:&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; - Integer numbers.&lt;br /&gt;
:&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt; - Floating point numbers.&lt;br /&gt;
;&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;: The name to assign to the field. Note that this must also be a valid name.&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;: The number of fields to define. Used in conjunction with &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; for multiple definitions. Must be &amp;gt;= &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
;&amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt;: The index to start multiple definitions with. Must be &amp;gt;= &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Undefining a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; [&amp;amp;hellip; /Undefine]&lt;br /&gt;
&lt;br /&gt;
Undefine an existing field and delete contents of all field entries. Multiple undefines are possible by using the option &amp;lt;code&amp;gt;/Undefine&amp;lt;/code&amp;gt; in conjunction with multiple parameters.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;index|name&amp;lt;/var&amp;gt;: The index or name of the field(s) to undefine.&lt;br /&gt;
&lt;br /&gt;
== Renaming a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;fieldName&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;newName&amp;lt;/var&amp;gt; /Rename&lt;br /&gt;
&lt;br /&gt;
Rename an existing field.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fieldName&amp;lt;/var&amp;gt;: The existing field name.&lt;br /&gt;
;&amp;lt;var&amp;gt;newName&amp;lt;/var&amp;gt;: The new field name&lt;br /&gt;
;&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;&lt;br /&gt;
:The mandatory option &amp;lt;code&amp;gt;/Rename&amp;lt;/code&amp;gt;, specifying that this &amp;lt;code&amp;gt;DEFINE&amp;lt;/code&amp;gt; command should rename the field.&lt;br /&gt;
&lt;br /&gt;
An example can be found in the macro file &amp;lt;code&amp;gt;table_redefine.sts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Deleting table entries ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;] /Delete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Delete all visible entries or the specified entry &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== {{anchor|FIND|Finding table entries}} ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function implements a simple &#039;database query&#039; interface for tables. To create complex queries, it may be necessary to apply a set of &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt;s and possibly combine them with the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/FIND|FIND]]&amp;lt;/code&amp;gt; command. The &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function only searches tagged entries. Therefore, if you want to search the whole table, you must tag all the entries first. At the end of a query (any number of &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function calls), the tagged entries are those matching the search criteria.&lt;br /&gt;
&lt;br /&gt;
SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FIND&lt;br /&gt;
&lt;br /&gt;
Initialize a new find cycle. The tag flag of all entries are set and visibility is set to ALL. This command should be issued before a new query consisting of multiple commands is started. Instead of this command the option /Start can be used with the (first) &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FIND &amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;loper cexpr&amp;lt;/var&amp;gt; ...] [/Start /Invert /Tagged]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Search for all tagged entries matching the criteria defined by the &amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;loper&amp;lt;/var&amp;gt; arguments. The tag flags of all not matching entries are cleared. The logical operators are evaluated strictly from left to right. This means the result of all expressions of the left side of an operator is combined with the result of the expression on the right side. The logical operators &amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt; (=&amp;amp;&amp;amp;), &amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt; (=||) and &amp;lt;code&amp;gt;XOR&amp;lt;/code&amp;gt; (=^^) are defined. Note that the field value for simple tables is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The expression defining one search criterion (see Find expressions for details).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;loper&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The logical operator combining two search criteria; logical operators are applied from left to right, bracketing is not possible. The following operators are supported:&lt;br /&gt;
&lt;br /&gt;
::conjunction: &amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; &lt;br /&gt;
::disjunction: &amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt;&lt;br /&gt;
::exclusive disjunction: &amp;lt;code&amp;gt;XOR&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;^^&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Start&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Initialize a new find cycle (this is like a call to &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; without arguments and is applied before query).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Invert&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Invert all tag flags (applied after query).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Tagged&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Switch to visibility &amp;quot;tagged&amp;quot; (applied after query).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// search for entries where key field ends with &#039;ing&#039;&lt;br /&gt;
// and show only tagged entries&lt;br /&gt;
$#t find &#039;key:=I:*ing&#039; /Tagged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== {{Anchor|FINDEXPR|Find expressions}} ==&lt;br /&gt;
{{:Programmer_Guide/General_Descriptions/Find_Expressions}}&lt;br /&gt;
&lt;br /&gt;
== Regular expressions ==&lt;br /&gt;
&lt;br /&gt;
S_TOOLS&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;STx supports searches using POSIX regular expression. When using regular expressions, characters which have a special meaning in {{STX}} will need to be escaped using the {{STX}} escape character &amp;quot;&amp;lt;code&amp;gt;`&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|fieldid:cond:regex&lt;br /&gt;
|Match the value of a string field (type &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;).{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fieldid&lt;br /&gt;
|name or index of a string field (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for simple tables)&lt;br /&gt;
|-&lt;br /&gt;
|cond&lt;br /&gt;
|=RI&lt;br /&gt;
|matching regular expression ignoring case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|=RR&lt;br /&gt;
|matching regular expression respecting case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|!RI&lt;br /&gt;
|not matching regular expression even if ignoring case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|!RR&lt;br /&gt;
|not matching regular expression if respecting case.&lt;br /&gt;
|-&lt;br /&gt;
|regex&lt;br /&gt;
|a POSIX regular expression.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The script &amp;lt;code&amp;gt;regular_expressions.sts&amp;lt;/code&amp;gt; provides examples of usage.&lt;br /&gt;
&lt;br /&gt;
== Formatting table fields ==&lt;br /&gt;
&lt;br /&gt;
Formatting is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]].&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FORMAT &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;numfmt &amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;intfmt&amp;lt;/var&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Configuration of the write format used to save and load tables from files (see [[XXX|&amp;lt;code&amp;gt;SET file LOAD&amp;lt;/code&amp;gt;]] and [[XXX|&amp;lt;code&amp;gt;SET file SAVE&amp;lt;/code&amp;gt;]]). You can configure the [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Show_Format|show format]] (used to display tables in the GUI) using the [[Programmer_Guide/Shell_Items/Table/SET_TABLE#Configuring_a_table_field|&amp;lt;code&amp;gt;CONFIG&amp;lt;/code&amp;gt;]] command.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - Store all fields even if they are empty. Assigned fields have the format &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt; and empty fields have just the &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;. E.g.: &amp;lt;code&amp;gt;10.0 ; 10.1 ; ; 10.3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;1 &amp;lt;/code&amp;gt; - Only assigned fields are stored. Every assigned field outputs the following string &amp;lt;code&amp;gt;fieldindex&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;. E.g.: &amp;lt;code&amp;gt;c0=10.0 ; c1=10.1 ; c2= ; c3=10.3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note: In order to load a table successfully, it must be loaded using the same format setting as was used to save it.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;&lt;br /&gt;
:delimiter string used to separate fields in the output line (for both formats). The special symbol &#039;%t&#039; can be used to specify the tab character. Consecutive white spaces (blanks and tabs) are interpreted as one delimiter. E.g. &amp;quot; 1 2 3&amp;quot; is interpreted as three fields, whereas &amp;quot;:1::2:3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt;&lt;br /&gt;
:delimiter string used to separate the &amp;lt;code&amp;gt;fieldindex&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; (for format &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; only)&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;numfmt&amp;lt;/var&amp;gt;&lt;br /&gt;
:Float format string used for all fields of type &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;. This can be any valid C string format specifier.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;intfmt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Integer (!) format string used for all fields of type &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;. This can be any valid C string format specifier.&lt;br /&gt;
&lt;br /&gt;
You can set the decimal symbol using the [[#Setting_the_table_mode|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]] command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
///////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//    Macro:          load_a_file_into_a_table.sts&lt;br /&gt;
//    Description:    load the contents of a numeric text file into a parameter&lt;br /&gt;
//                    table and displays the table if desired&lt;br /&gt;
//    Parameters:     #fileName    the file to load&lt;br /&gt;
//                    #mode        0    silent&lt;br /&gt;
//                                 1    show table&lt;br /&gt;
//                                 2    return table&lt;br /&gt;
//    Return:         0 on success, non-zero on failure&lt;br /&gt;
//    Usage:          load_a_file_into_a_table [file] ; [show]&lt;br /&gt;
//    Author:         Jonnie White&lt;br /&gt;
//    History:        2005-03-31    jw    created&lt;br /&gt;
//                    2005-04-27    jw    added new mode (return table) and file &lt;br /&gt;
//                                        parameter&lt;br /&gt;
//&lt;br /&gt;
///////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
[macro load_a_file_into_a_table]&lt;br /&gt;
    #fileName := set &#039;$scriptDirectory\input_matrix_small.txt&#039;&lt;br /&gt;
    #mode := 1&lt;br /&gt;
    readvar #argv #fileName&#039;;&#039;#mode&lt;br /&gt;
&lt;br /&gt;
    // create a parameter table with 4 fields&lt;br /&gt;
    #tableItem := new table * 4 /Parameter number:f:4&lt;br /&gt;
    if &#039;$#tableItem&#039; == * em -1 ; failed to create a table&lt;br /&gt;
    &lt;br /&gt;
    // set the write format to blank separated&lt;br /&gt;
    $#tableItem format 0 &#039; &#039;&lt;br /&gt;
    &lt;br /&gt;
    // create the read-only file object associated with fileName&lt;br /&gt;
    #fileItem := new file * &#039;$#fileName&#039; /Text /Read&lt;br /&gt;
    if &#039;$#fileItem&#039; == * em -1 ; failed to open the file $#fileName&lt;br /&gt;
    &lt;br /&gt;
    // load the file into the table&lt;br /&gt;
    $#fileItem load $#tableItem&lt;br /&gt;
    if &#039;$rc&#039; &amp;gt; 0 em -1 ; failed to load file $#fileName into table $#tableItem&lt;br /&gt;
    &lt;br /&gt;
    // show the table&lt;br /&gt;
    if &#039;$#mode&#039; == 1 showitem $#tableItem&lt;br /&gt;
    &lt;br /&gt;
    // return table&lt;br /&gt;
    if &#039;$#mode&#039; == 2 then&lt;br /&gt;
        delete $#fileItem&lt;br /&gt;
        exit 1 set &#039;$#tableItem&#039;&lt;br /&gt;
    else&lt;br /&gt;
        // clean up&lt;br /&gt;
        delete $#fileItem $#tableItem&lt;br /&gt;
    end&lt;br /&gt;
exit 1 int 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that if you need to save a table containing empty fields, you should *not* use a blank or a tab character as the delimiter. If you do, the empty fields will be omitted on loading the table.&lt;br /&gt;
&lt;br /&gt;
== Locking / Unlocking the table ==&lt;br /&gt;
&lt;br /&gt;
The use of &#039;&#039;&#039;lock/unlock&#039;&#039;&#039; is only important, if a table item is (or may be) used by more than one thread. In {{STX}} shells, spu items and display item are running in their own thread.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; LOCK [/Save]&lt;br /&gt;
Lock the table item. The execution of the calling shell is stopped, until the item can be locked. If locked, only the shell which locked it has access to the item until it is explicitly unlocked with the command &amp;lt;code&amp;gt;UNLOCK&amp;lt;/code&amp;gt;. Always beware of deadlocks.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; LOCK &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; [Save]&lt;br /&gt;
Try to lock the table item, but wait only the specified time. This command returns &#039;&#039;&#039;0&#039;&#039;&#039; (success) if the lock request was successful within the timeout, and a non-zero error code if not. If the caller already &#039;&#039;holds&#039;&#039; the lock, the command will fail immediately. This makes sense because, since the caller is the owner, it cannot release it whilst its waiting. The argument &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; specifies the maximum lock-timeout in milliseconds and must be a number greater than zero.&lt;br /&gt;
&lt;br /&gt;
:* If the table is locked with the option &#039;&#039;&#039;/Save&#039;&#039;&#039;, the tag state of each entry, the current order and the mode is saved on &amp;lt;code&amp;gt;lock&amp;lt;/code&amp;gt; and restored with the &amp;lt;code&amp;gt;unlock&amp;lt;/code&amp;gt; command. In this case in the critical section entries can only be modified, but not created or deleted. &lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; UNLOCK&lt;br /&gt;
Unlock the table item. &#039;&#039;&#039;Note&#039;&#039;&#039;: It&#039;s very important that for each successful &amp;lt;code&amp;gt;LOCK&amp;lt;/code&amp;gt;, an &amp;lt;code&amp;gt;UNLOCK&amp;lt;/code&amp;gt; is called!&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;lock_example.sts&amp;lt;/code&amp;gt; in the script examples directory for an example.&lt;br /&gt;
&lt;br /&gt;
== Setting the table mode ==&lt;br /&gt;
&lt;br /&gt;
This command is only applicable for [[Programmer_Guide/Concepts/Extended_table|extended tables]].&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; MODE &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;access format decimal&amp;lt;/var&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Set table mode (configuration / data) and general attributes.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A flag to switch the table mode to configuration mode (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) or data mode (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;); After creating an extended table the table may be in configuration or data mode, depending on the &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; command. See &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW table]]&amp;lt;/code&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;access&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This argument is currently meaningless. It is reserved for future database functions and should be set to &#039;&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&#039; or &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Selects the format to be used for file I/O: &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;amp;hellip;[[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Show_Format|show format]], &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&amp;amp;hellip;[[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Write_Format|write (default) format]].&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;decimal&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the character to be used as the decimal symbol. By default, the period &#039;&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;&#039; is used.&lt;br /&gt;
&lt;br /&gt;
Since {{STX}} 3.7.0, the &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW TABLE]]&amp;lt;/code&amp;gt; syntax has been modified to include the field definitions. The table mode is then automatically set to data, and hence this command may in future be pretty much obsolete, except for setting the decimal symbol.&lt;br /&gt;
&lt;br /&gt;
== Showing and hiding table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; /All|Tagged&lt;br /&gt;
&lt;br /&gt;
Make either all table entries visible (&amp;lt;code&amp;gt;/All&amp;lt;/code&amp;gt;) or only tagged entries (&amp;lt;code&amp;gt;/Tagged&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Only visible entries can be accessed, deleted or displayed (e.g. in a list box).&lt;br /&gt;
&lt;br /&gt;
== Sorting table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT [/Respect]&lt;br /&gt;
&lt;br /&gt;
Invert entry order (all tables) &amp;lt;!-- wie bitte!? --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For simple tables:&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT &amp;lt;var&amp;gt;dir&amp;lt;/var&amp;gt; [/Respect]&lt;br /&gt;
&lt;br /&gt;
For extended tables:&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT &amp;lt;var&amp;gt;fieldid dir&amp;lt;/var&amp;gt; [&amp;amp;hellip;] [/Respect]&lt;br /&gt;
&lt;br /&gt;
Sort table entries. For simple tables only the sort direction (&amp;lt;var&amp;gt;dir&amp;lt;/var&amp;gt;: Ascending (0), Descending (1)) can be selected.&lt;br /&gt;
&lt;br /&gt;
For extended tables, one or more fields and the sort direction can be specified. The sort function ignores the visibility setting and sorts all table entries. If the option &amp;lt;code&amp;gt;/Respect&amp;lt;/code&amp;gt; is used, strings are sorted respecting their case, otherwise the sort is case-insensitive.&lt;br /&gt;
&lt;br /&gt;
== Tagging table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; /Reset|Invert&lt;br /&gt;
&lt;br /&gt;
Reset (/Reset) or invert (/Invert) tag flags of all entries and set visibility to ALL.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table index&amp;lt;/var&amp;gt; /Tag|Untag|Invert&lt;br /&gt;
&lt;br /&gt;
Set, clear or invert tag flag of an entry. These options can also be used in all table commands assigning a value.&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;TAGS&amp;lt;/code&amp;gt; can be used to save and restore a table&#039;s tagged entries.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/NEW&amp;diff=10302</id>
		<title>Programmer Guide/Command Reference/NEW</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/NEW&amp;diff=10302"/>
		<updated>2019-01-21T14:03:19Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Programmer Guide}}&lt;br /&gt;
The &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; command creates a new [[Programmer_Guide/Shell_Items|shell item]] of the type &amp;lt;var&amp;gt;itemtype&amp;lt;/var&amp;gt; and named &amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 NEW &amp;lt;var&amp;gt;itemtype&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt; [ [[Programmer_Guide/Command_Reference_Options/Silent|/I]] ] [ /U|/u ] [ /G ] [ /Z ] [ &amp;lt;var&amp;gt;createargs&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;createopts&amp;lt;/var&amp;gt; ] ]&lt;br /&gt;
&lt;br /&gt;
The following is applicable to all &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; commands:&lt;br /&gt;
&lt;br /&gt;
*The argument &amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt; can be set to &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039; if the item should automatically be given a unique name (e.g. &amp;lt;code&amp;gt;NEW FILE * /File&amp;lt;/code&amp;gt;).&lt;br /&gt;
*The name of a new item is always stored in the variable &amp;lt;code&amp;gt;#NEW&amp;lt;/code&amp;gt; if the command was successfully completed, otherwise &amp;lt;code&amp;gt;#NEW&amp;lt;/code&amp;gt; is set to &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039;.&lt;br /&gt;
*An item must be deleted (&amp;lt;code&amp;gt;DELETE name&amp;lt;/code&amp;gt;) before another &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; command using the same name can be successfully executed.&lt;br /&gt;
*&amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; commands can be used in inline statements with the syntax &amp;lt;code&amp;gt;#item = $(NEW itemx paramx)&amp;lt;/code&amp;gt;. The variable &amp;lt;code&amp;gt;#item&amp;lt;/code&amp;gt; is assigned the value of &amp;lt;code&amp;gt;#NEW&amp;lt;/code&amp;gt;. Therefore if the command fails, both are assigned the value &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;itemtype&amp;lt;/var&amp;gt;: The type of the new [[Programmer_Guide/Shell_Items|shell item]]. This must be unique (in the item namespace of a shell).&lt;br /&gt;
;&amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt;: The name of the new [[Programmer_Guide/Shell_Items|shell item]]. If this argument is set to the character &#039;&#039;&#039;*&#039;&#039;&#039;, the name is choosen automatically.&lt;br /&gt;
;&amp;lt;var&amp;gt;createargs&amp;lt;/var&amp;gt;: Arguments specifying parameters for the initialization of the new item. The format and meaning of these arguments are depending on the type of the new .&lt;br /&gt;
;&amp;lt;code&amp;gt;/I&amp;lt;/code&amp;gt;: Enable [[Programmer_Guide/Command_Reference_Options/Silent|silent error reporting]]. If specified, &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; will generate a warning rather than an error if arguments are missing or it is unable create the new item.&lt;br /&gt;
;&amp;lt;code&amp;gt;/G&amp;lt;/code&amp;gt;: Garbage collection. If specified, a temporary (or local) item created, which is automatically deleted when exiting the macro.&lt;br /&gt;
;&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;: If specified, the global item protection is enabled. This means all items created before this item (called the protection-master) are protected from being deleted, until the global item protection is disabled, which is done by deleting the protection-master). Protected items can only be deleted using a special option of the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/DELETE|DELETE]]&amp;lt;/code&amp;gt; command. Note: This option is case-sensitive.&lt;br /&gt;
;&amp;lt;code&amp;gt;/u&amp;lt;/code&amp;gt;: If specified, the created item is protected from being deleted, until the global item protection is disabled, which is done by deleting the protection-master). Note: This option is case-sensitive.&lt;br /&gt;
;&amp;lt;code&amp;gt;/z&amp;lt;/code&amp;gt;: Use this option, to create a reference to an already existing shell item (also if owned by another shell). For more details read the section about [[Programmer_Guide/Shell_Items|shell items]]&lt;br /&gt;
&lt;br /&gt;
The following example creates a new table with an automatic name and assigns the name to a local variable or exits if the table was not created.&lt;br /&gt;
&lt;br /&gt;
 NEW TABLE *&lt;br /&gt;
 if &#039;$#new&#039; == &#039;*&#039; then  &lt;br /&gt;
     butil msgbox msg ; Failed to create table   &lt;br /&gt;
     exit&lt;br /&gt;
 end&lt;br /&gt;
 #t := $#new$#t * &#039;my first entry&#039; // append entry to table&lt;br /&gt;
&lt;br /&gt;
You can also use your own name, rather than an automatically generated one. In this case, the code would look like this.&lt;br /&gt;
&lt;br /&gt;
 NEW TABLE myTable&lt;br /&gt;
 if &#039;$#new&#039; == &#039;*&#039; then&lt;br /&gt;
     butil msgbox msg ; Failed to create table&lt;br /&gt;
     exit&lt;br /&gt;
 end&lt;br /&gt;
 myTable * &#039;my first entry&#039; // append entry to table&lt;br /&gt;
&lt;br /&gt;
Alternatively, with the inline syntax:&lt;br /&gt;
&lt;br /&gt;
 #t := $(NEW TABLE *)&lt;br /&gt;
 if &#039;$#t&#039; == &#039;*&#039; then&lt;br /&gt;
    butil msgbox msg ; Failed to create table&lt;br /&gt;
    exit&lt;br /&gt;
 end&lt;br /&gt;
 $#t * &#039;my first entry&#039; // append entry to table&lt;br /&gt;
&lt;br /&gt;
All instances created with the NEW command should be deleted when no longer needed using the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/DELETE|DELETE]]&amp;lt;/code&amp;gt; command.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Wave/WAVE_Item_Attributes&amp;diff=10249</id>
		<title>Programmer Guide/Shell Items/Wave/WAVE Item Attributes</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Wave/WAVE_Item_Attributes&amp;diff=10249"/>
		<updated>2018-11-22T13:28:23Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Wave Item}}&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!BEGIN&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute !BEGIN returns the start address in samples.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!CHANNELS&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!CHANNELS&amp;lt;/code&amp;gt; returns the number of signal channels.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!DEVICE&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!DEVICE&amp;lt;/code&amp;gt; returns the type of device attached to wave item or an empty string if no device is attached. Possible values are:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;PLAY&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RECORD&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!INCAPS&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!INCAPS&amp;lt;/code&amp;gt; returns the capabilities of the selected input device in the following format:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;devicename ; MME|ASIO|* maxch|* minsr|* maxsr|* anysr{0|1}; sr1 .. srN; fmt1 .. fmtN;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!INDEVICE&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!INDEVICE&amp;lt;/code&amp;gt; returns the id of the input wave device referenced by the mandatory second parameter &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:E.g.:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;$#wave[!indevice,$#wave[!indevices]-1]&amp;lt;/code&amp;gt; // returns the id of the last available input device.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!INDEVICES&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!INDEVICES&amp;lt;/code&amp;gt; returns the number of installed wave recording devices.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!INSELECTED&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!INSELECTED&amp;lt;/code&amp;gt; returns the index of the wave device selected for recording functions.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!LENGTH&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!LENGTH&amp;lt;/code&amp;gt; returns the length of the signal in samples.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!OUTCAPS&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!OUTCAPS&amp;lt;/code&amp;gt; returns the capabilities of the selected output device in the following format:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;devicename ; MME|ASIO|* maxch|* minsr|* maxsr|* anysr{0|1}; sr1 .. srN; fmt1 .. fmtN;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!OUTDEVICE&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!OUTDEVICE&amp;lt;/code&amp;gt; returns the id of the output wave device referenced by the mandatory second parameter &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:E.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$#wave[!outdevice,0] // returns the id of the first playback device&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
;&amp;lt;var&amp;gt;!OUTDEVICES&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!OUTDEVICES&amp;lt;/code&amp;gt; returns the number of installed wave playback devices.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!OUTSELECTED&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!OUTSELECTED&amp;lt;/code&amp;gt; returns the index of the wave device selected for playback functions.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!PLAYGAIN&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!PLAYGAIN&amp;lt;/code&amp;gt; returns the linear gain value currently being used for playback. If a second parameter, &amp;lt;var&amp;gt;NewGainValue&amp;lt;/var&amp;gt;, is specified, then the playback gain value is changed. If playback is in progress, the new gain value is first used when the current buffer has been played.&lt;br /&gt;
&lt;br /&gt;
:Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#linearGainValue := $#wave[!PlayGain] // retrieve gain value&lt;br /&gt;
#linearGainValue := $#wave[!PlayGain, $(num $#linearGainValue + 1)] // increase the gain value by one.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
;&amp;lt;var&amp;gt;!PLAYSRATE&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!PLAYGAIN&amp;lt;/code&amp;gt; returns the sampling rate used for playback. If a second parameter, &amp;lt;var&amp;gt;NewPlaybackSRate&amp;lt;/var&amp;gt;, is specified, then the playback sampling rate is set to this new value. See the script &amp;lt;code&amp;gt;playsrate.sts&amp;lt;/code&amp;gt; for an example.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!POSITION&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!POSITION&amp;lt;/code&amp;gt; returns access position in samples of the attached device. The signal between &amp;lt;code&amp;gt;!BEGIN&amp;lt;/code&amp;gt; and this position has already been processed. This value is empty if the wave item is not being played.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!PROGRESS&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!PROGRESS&amp;lt;/code&amp;gt; returns the amount of the signal which has been progressed as a percentage of its length.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!SIGNAL[,channel[,offset[,length]]]&amp;lt;/var&amp;gt;&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!SIGNAL&amp;lt;/code&amp;gt; returns the signal as a vector of samples in a shell table.&lt;br /&gt;
:You can also specify the channel, offset and length (e.g. &amp;lt;samp&amp;gt;$#wave[!signal,1]&amp;lt;/samp&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!SRATE&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!SRATE&amp;lt;/code&amp;gt; returns the sampling rate in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!TYPE&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!TYPE&amp;lt;/code&amp;gt; returns the type of the wave item or an empty string if no signal is addressed by wave item. The type is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;STREAM&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;SEQUENCE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;ADC&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;DAC&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:For virtual wave items, the type of real wave item is returned.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;!MODE&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVE&amp;lt;/code&amp;gt; item attribute &amp;lt;code&amp;gt;!MODE&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;WRITE&amp;lt;/code&amp;gt; if signal can be written to (stored in) the wave and &amp;lt;code&amp;gt;READ&amp;lt;/code&amp;gt; if the signal can only be read but not changed&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10244</id>
		<title>Programmer Guide/Shell Items/Dialog/SET DIALOG</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10244"/>
		<updated>2018-11-13T15:08:03Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Setting the attributes of a control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Dialog Item}}&lt;br /&gt;
Use the [[Programmer_Guide/Shell_Items/Dialog/NEW_DIALOG|&amp;lt;code&amp;gt;NEW DIALOG&amp;lt;/code&amp;gt;]] command for creating a [[Programmer_Guide/Shell_Items/Dialog|&amp;lt;code&amp;gt;DIALOG&amp;lt;/code&amp;gt; shell item]]. Then apply the &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; commands described here. &lt;br /&gt;
&lt;br /&gt;
== Data Exchange==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
&lt;br /&gt;
Exchange data between the dialog controls and their respective variables.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The optional id of an existing control. If specified, the exchange only takes place for this control. Otherwise, all data for all controls is exchanged.&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The direction of data exchange (as seen from the shell).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; || reads the data out of the control into the shell variable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; || sets the values of the controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you want to read or write only a subset of connected dialog controls, you may do so by using the command&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
See [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Setting_the_attributes_of_a_control|Setting the attributes of a control]] on this page.&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Control ==&lt;br /&gt;
&lt;br /&gt;
Set the display and/or dialog window mode, style position and/or size, and configure the dialog. If the option &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; (dialog &amp;amp;rarr; shell) or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; (shell &amp;amp;rarr; dialog) is specified, a data exchange between the dialog controls and the variables and items bound to the controls is performed. The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; command has different functions for displays with only a dialog and for displays containing a dialog and graphs.&lt;br /&gt;
&lt;br /&gt;
=== Dialog only ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;] [/Centered /Foreground /Dialog /View /Layout|layout]&lt;br /&gt;
&lt;br /&gt;
The dialog is enabled (window is created) and the command is forwarded to the display.&lt;br /&gt;
&lt;br /&gt;
=== Dialog and graphs ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [/Read|Write]&lt;br /&gt;
&lt;br /&gt;
The dialog window mode is set. Other arguments/options are ignored if specified.&lt;br /&gt;
&lt;br /&gt;
=== Options ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The dialog window mode, one out of &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt; is used, the dialog window is destroyed and the dialog must be reconfigured (i.e. controls must be created etc).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt;&lt;br /&gt;
| The window style (&amp;lt;code&amp;gt;MINIMIZE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAXIMIZE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;RESTORE&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;&lt;br /&gt;
|The x-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;&lt;br /&gt;
| The y-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;&lt;br /&gt;
| The height of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Centered&amp;lt;/code&amp;gt;&lt;br /&gt;
| Center the display to the screen in which the mouse is currently. &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; are ignored.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Foreground&amp;lt;/code&amp;gt;&lt;br /&gt;
| Send the window to the front (make the window the topmost window).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Dialog=&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set dialog position inside the display (relative to graphs); changing the position is only possible if the dialog is non-floating. The following values for &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; are allowed: &amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/View=&amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set window view mode to &amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt; (&#039;&amp;lt;code&amp;gt;WINDOW&amp;lt;/code&amp;gt;&#039; is a normal window, or &#039;&amp;lt;code&amp;gt;FULLSCREEN&amp;lt;/code&amp;gt;&#039; = display takes up whole screen (for displays of type &#039;frame&#039; only) or &#039;&amp;lt;code&amp;gt;ALWAYSONTOP&amp;lt;/code&amp;gt;&#039; = the display remains on top, even when other windows are activated).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt;&lt;br /&gt;
| Recalculate the dialog window size, including (&amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; - note the upper-case &amp;amp;quot;L&amp;amp;quot;) or ignoring (&amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt; - note the lower-case &amp;amp;quot;l&amp;amp;quot;) hidden controls (this is one of our very few case-sensitive option letters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Configuration==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; TITLE &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the caption of the display owning the &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;. The caption can be an empty string. Note that it is advisable to surround the string &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; in quotes, since otherwise, only the first word of the string is interpreted as the title (the rest being additional arguments, which are ignored).&lt;br /&gt;
&lt;br /&gt;
Code example:&lt;br /&gt;
 SET $#dlg TITLE &#039;Der Wiener Schnitzel mit de Lavignetten und de Sauerkraut&#039;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;LAYOUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; LAYOUT &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the dialog margins and the default font. The default font will be used for all &#039;&#039;newly&#039;&#039; created controls (the existing ones will keep their respective font). The unit for specifying margins is characters, just like the control position and size. So, if you specify a margin of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;, it will be roughly as wide as a string of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; characters would be (&amp;amp;quot;roughly&amp;amp;quot;, because with proportional fonts, the single characters are of different widths). Note that each control may be assigned an individual font, thereby overriding this default font (see &amp;lt;code&amp;gt;SET dialog index controltype&amp;lt;/code&amp;gt; below).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The default font (see Fonts and Font Arguments for details).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the left/right side (in characters).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the top/bottom (in characters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Context Menus ==&lt;br /&gt;
&lt;br /&gt;
It is possible to attach a set of context menus to each dialog. The displaying of the context menu is controlled by the programmer (normally by processing the messages &amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMSTAT]]&amp;lt;/code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages| and ]]&amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMITEM]]&amp;lt;/code&amp;gt; in a message handler). Context menus are identified by an id string (specified in the &amp;lt;code&amp;gt;ADDPOPUP /X&amp;lt;/code&amp;gt; command) or a zero-based index (in the same order as the &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; commands). Note: If the option /X is not supplied in a command, the menu handling command is forwarded to the display and used for popup-menu handling. For a detailed description of menu item formats and menu item index computation see command &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Display/SET_DISPLAY#ADDPOPUP|SET display ADDPOPUP]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;amp;hellip; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;tableitem&amp;lt;/var&amp;gt; /Table&lt;br /&gt;
&lt;br /&gt;
Add a context menu to the dialog.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt;&lt;br /&gt;
| The id of the context menu in the dialog (a dialog can have more than one context menu). This is not shown in the menu itself.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
| The menu items.&lt;br /&gt;
|-&lt;br /&gt;
|  &amp;lt;var&amp;gt;tableItem&amp;lt;/var&amp;gt;&lt;br /&gt;
| A table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;SETPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; SETPOPUP /X &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Enable|Disable ] [ /Check|Uncheck ]&lt;br /&gt;
&lt;br /&gt;
Activate or deactivate and/or set or clear the check state of menu items &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;. The items may be located in different menus.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;DELPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELPOPUP /X&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELETEPOPUP /X&lt;br /&gt;
&lt;br /&gt;
Delete all context menus. Note that you can replace an existing popup by just calling &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; again with the same index.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;CONTEXTMENU&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; CONTEXTMENU &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Show the contextmenu with index or id &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;. This command is usually called in response to a &amp;lt;code&amp;gt;CMSTAT&amp;lt;/code&amp;gt; message.&lt;br /&gt;
&lt;br /&gt;
== Editing cells in a &amp;lt;code&amp;gt;LISTVIEW&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listviewIndex&amp;lt;/var&amp;gt; STARTEDIT &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the dialog focus to the specified cell and enters edit mode. If the user presses ESC, Return or Enter, the control leaves edit mode. &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; are zero-based indices addressing the field and entry. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the attributes of a control ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
&lt;br /&gt;
Set mode and attributes of a control.&lt;br /&gt;
 &lt;br /&gt;
;/N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;: apply settings to &#039;&#039;all&#039;&#039; controls in a range &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;+count-1&amp;lt;/code&amp;gt;&lt;br /&gt;
;/Read, /Write: request data being transferred from the dialog to the connected shell variable/item (Read), or from the connected shell variable/item to the dialog control (Write) - for a description, see the [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Data_Exchange|Data Exchange]] section on this page. This data exchange will take place for the addressed control(s) only (as opposed to &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; which transfers data to/from &#039;&#039;all&#039;&#039; controls of the dialog).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The index of the (first) control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
| The number of controls (&amp;gt;= 1, default = 1).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control mode (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; is defined for compatibility to earlier versions only. It has the same meaning as &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; (do not change mode, just set attributes).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control caption.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control font. See Fonts and Font Arguments for details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;,&amp;amp;nbsp;&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;&lt;br /&gt;
|The foreground (&amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;) and background (&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;) color. You may use either a color keyword or an RGB value for each of &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The color and font specifications are described in the appendix. Note that color settings are applied to controls of type &amp;lt;code&amp;gt;static&amp;lt;/code&amp;gt;, and to the caption of controls with a separate caption, window only.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; ] [ /Read|Write ] /Layout | /layout | /Setposition&lt;br /&gt;
&lt;br /&gt;
Set mode, caption, font, position and size of a control&lt;br /&gt;
;/Layout: update position/size of the control and recompute dialog window layout&lt;br /&gt;
;/layout: update position/size of the control and recompute dialog window layout, ignore hidden controls&lt;br /&gt;
;/Setposition: update position/size of the control but do not recompute dialog window layout&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;row, col&amp;lt;/var&amp;gt;&lt;br /&gt;
| new control position (use -1 or * if a value should not be changed)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width, height&amp;lt;/var&amp;gt;&lt;br /&gt;
| new control size (use -1 or * if a value should not be changed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;FOCUS&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
&lt;br /&gt;
Give a particular control the input focus. All keyboard input is then directed to the control. This command can be used in setup or input dialogs to set the focus to the default input field after creating and displaying the dialog. If no index is specified or if its value is less than zero, the focus is set to the dialog window itself.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;INPUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; INPUT &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect dialog control with a data output.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
| an SPU output or a value object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;BITMAP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET dialog index BITMAP &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt; ][ /B ]&lt;br /&gt;
&lt;br /&gt;
Assign a bitmap to a button or a static control. The assigned bitmap is displayed in its original size and colors in the center of the control. If no bitmap is specified, any existing assignment is removed. Bitmaps can be read from bitmap files (*.BMP) or from the {{STX}} resource file. To identify a resource the name (or index) of a bitmap resource (no option) or a toolbar button (option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;) can be used.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &#039;button&#039; or &#039;static&#039; dialog control index.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;&lt;br /&gt;
| The bitmap id or toolbar button id. See the &amp;quot;Bitmaps for Dialog Controls, Icons, Toolbar Buttons&amp;quot; topic in &amp;lt;GD&amp;gt; for a list of available b&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a bitmap file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt;&lt;br /&gt;
| If specified, this string will be displayed as a tooltip when the mouse hovers over the button. This parameter overrides any string associated with the bitmap (/b) in the resource file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;&lt;br /&gt;
| If the option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt; is specified, the &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt; references a toolbar button (rather than a bitmap resource). [[Programmer_Guide/General_Descriptions/Bitmaps_for_Dialog_Controls,_Icons,_Toolbar_Buttons|Bitmaps for Dialog Controls, Icons, Toolbar Buttons]] shows all images available in {{STX}}.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET dialog index BITMAP&amp;lt;/code&amp;gt; command only works once a dialog has been created, i.e. after &amp;lt;code&amp;gt;domodaldialog begin&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Creation ==&lt;br /&gt;
&lt;br /&gt;
You can create a control in a dialog using the &amp;lt;code&amp;gt;SET dialog index controlType&amp;lt;/code&amp;gt; commands defined below. All dialog controls must be created before the dialog is displayed for the first time. You can show and hide dialog controls once the dialog has been created with the &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; command. See [[Programmer_Guide/Shell_Items/Dialog/Dialog_Controls|Dialog Controls]] for a list of available controls and their individual creation syntax.&lt;br /&gt;
&lt;br /&gt;
The number of controls per dialog is limited to 255 due to the MFC implementation.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10243</id>
		<title>Programmer Guide/Shell Items/Dialog/SET DIALOG</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10243"/>
		<updated>2018-11-13T15:06:38Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Setting the attributes of a control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Dialog Item}}&lt;br /&gt;
Use the [[Programmer_Guide/Shell_Items/Dialog/NEW_DIALOG|&amp;lt;code&amp;gt;NEW DIALOG&amp;lt;/code&amp;gt;]] command for creating a [[Programmer_Guide/Shell_Items/Dialog|&amp;lt;code&amp;gt;DIALOG&amp;lt;/code&amp;gt; shell item]]. Then apply the &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; commands described here. &lt;br /&gt;
&lt;br /&gt;
== Data Exchange==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
&lt;br /&gt;
Exchange data between the dialog controls and their respective variables.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The optional id of an existing control. If specified, the exchange only takes place for this control. Otherwise, all data for all controls is exchanged.&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The direction of data exchange (as seen from the shell).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; || reads the data out of the control into the shell variable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; || sets the values of the controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you want to read or write only a subset of connected dialog controls, you may do so by using the command&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
See [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Setting_the_attributes_of_a_control|Setting the attributes of a control]] on this page.&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Control ==&lt;br /&gt;
&lt;br /&gt;
Set the display and/or dialog window mode, style position and/or size, and configure the dialog. If the option &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; (dialog &amp;amp;rarr; shell) or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; (shell &amp;amp;rarr; dialog) is specified, a data exchange between the dialog controls and the variables and items bound to the controls is performed. The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; command has different functions for displays with only a dialog and for displays containing a dialog and graphs.&lt;br /&gt;
&lt;br /&gt;
=== Dialog only ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;] [/Centered /Foreground /Dialog /View /Layout|layout]&lt;br /&gt;
&lt;br /&gt;
The dialog is enabled (window is created) and the command is forwarded to the display.&lt;br /&gt;
&lt;br /&gt;
=== Dialog and graphs ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [/Read|Write]&lt;br /&gt;
&lt;br /&gt;
The dialog window mode is set. Other arguments/options are ignored if specified.&lt;br /&gt;
&lt;br /&gt;
=== Options ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The dialog window mode, one out of &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt; is used, the dialog window is destroyed and the dialog must be reconfigured (i.e. controls must be created etc).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt;&lt;br /&gt;
| The window style (&amp;lt;code&amp;gt;MINIMIZE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAXIMIZE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;RESTORE&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;&lt;br /&gt;
|The x-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;&lt;br /&gt;
| The y-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;&lt;br /&gt;
| The height of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Centered&amp;lt;/code&amp;gt;&lt;br /&gt;
| Center the display to the screen in which the mouse is currently. &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; are ignored.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Foreground&amp;lt;/code&amp;gt;&lt;br /&gt;
| Send the window to the front (make the window the topmost window).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Dialog=&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set dialog position inside the display (relative to graphs); changing the position is only possible if the dialog is non-floating. The following values for &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; are allowed: &amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/View=&amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set window view mode to &amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt; (&#039;&amp;lt;code&amp;gt;WINDOW&amp;lt;/code&amp;gt;&#039; is a normal window, or &#039;&amp;lt;code&amp;gt;FULLSCREEN&amp;lt;/code&amp;gt;&#039; = display takes up whole screen (for displays of type &#039;frame&#039; only) or &#039;&amp;lt;code&amp;gt;ALWAYSONTOP&amp;lt;/code&amp;gt;&#039; = the display remains on top, even when other windows are activated).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt;&lt;br /&gt;
| Recalculate the dialog window size, including (&amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; - note the upper-case &amp;amp;quot;L&amp;amp;quot;) or ignoring (&amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt; - note the lower-case &amp;amp;quot;l&amp;amp;quot;) hidden controls (this is one of our very few case-sensitive option letters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Configuration==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; TITLE &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the caption of the display owning the &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;. The caption can be an empty string. Note that it is advisable to surround the string &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; in quotes, since otherwise, only the first word of the string is interpreted as the title (the rest being additional arguments, which are ignored).&lt;br /&gt;
&lt;br /&gt;
Code example:&lt;br /&gt;
 SET $#dlg TITLE &#039;Der Wiener Schnitzel mit de Lavignetten und de Sauerkraut&#039;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;LAYOUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; LAYOUT &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the dialog margins and the default font. The default font will be used for all &#039;&#039;newly&#039;&#039; created controls (the existing ones will keep their respective font). The unit for specifying margins is characters, just like the control position and size. So, if you specify a margin of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;, it will be roughly as wide as a string of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; characters would be (&amp;amp;quot;roughly&amp;amp;quot;, because with proportional fonts, the single characters are of different widths). Note that each control may be assigned an individual font, thereby overriding this default font (see &amp;lt;code&amp;gt;SET dialog index controltype&amp;lt;/code&amp;gt; below).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The default font (see Fonts and Font Arguments for details).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the left/right side (in characters).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the top/bottom (in characters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Context Menus ==&lt;br /&gt;
&lt;br /&gt;
It is possible to attach a set of context menus to each dialog. The displaying of the context menu is controlled by the programmer (normally by processing the messages &amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMSTAT]]&amp;lt;/code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages| and ]]&amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMITEM]]&amp;lt;/code&amp;gt; in a message handler). Context menus are identified by an id string (specified in the &amp;lt;code&amp;gt;ADDPOPUP /X&amp;lt;/code&amp;gt; command) or a zero-based index (in the same order as the &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; commands). Note: If the option /X is not supplied in a command, the menu handling command is forwarded to the display and used for popup-menu handling. For a detailed description of menu item formats and menu item index computation see command &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Display/SET_DISPLAY#ADDPOPUP|SET display ADDPOPUP]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;amp;hellip; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;tableitem&amp;lt;/var&amp;gt; /Table&lt;br /&gt;
&lt;br /&gt;
Add a context menu to the dialog.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt;&lt;br /&gt;
| The id of the context menu in the dialog (a dialog can have more than one context menu). This is not shown in the menu itself.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
| The menu items.&lt;br /&gt;
|-&lt;br /&gt;
|  &amp;lt;var&amp;gt;tableItem&amp;lt;/var&amp;gt;&lt;br /&gt;
| A table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;SETPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; SETPOPUP /X &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Enable|Disable ] [ /Check|Uncheck ]&lt;br /&gt;
&lt;br /&gt;
Activate or deactivate and/or set or clear the check state of menu items &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;. The items may be located in different menus.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;DELPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELPOPUP /X&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELETEPOPUP /X&lt;br /&gt;
&lt;br /&gt;
Delete all context menus. Note that you can replace an existing popup by just calling &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; again with the same index.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;CONTEXTMENU&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; CONTEXTMENU &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Show the contextmenu with index or id &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;. This command is usually called in response to a &amp;lt;code&amp;gt;CMSTAT&amp;lt;/code&amp;gt; message.&lt;br /&gt;
&lt;br /&gt;
== Editing cells in a &amp;lt;code&amp;gt;LISTVIEW&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listviewIndex&amp;lt;/var&amp;gt; STARTEDIT &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the dialog focus to the specified cell and enters edit mode. If the user presses ESC, Return or Enter, the control leaves edit mode. &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; are zero-based indices addressing the field and entry. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the attributes of a control ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
&lt;br /&gt;
Set mode and attributes of a control.&lt;br /&gt;
 &lt;br /&gt;
;/N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;: apply settings to &#039;&#039;all&#039;&#039; controls in a range &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;+count-1&amp;lt;/code&amp;gt;&lt;br /&gt;
;/Read, /Write: request data being transferred from the dialog to the connected shell variable/item (Read), or from the connected shell variable/item to the dialog control (Write) - for a description, see the [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Data_Exchange|Data Exchange]] section on this page. This data exchange will take place for the addressed control(s) only (as opposed to &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; which transfers data to/from &#039;&#039;all&#039;&#039; controls of the dialog).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The index of the (first) control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
| The number of controls (&amp;gt;= 1, default = 1).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control mode (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; is defined for compatibility to earlier versions only. It has the same meaning as &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; (do not change mode, just set attributes).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control caption.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control font. See Fonts and Font Arguments for details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;,&amp;amp;nbsp;&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;&lt;br /&gt;
|The foreground (&amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;) and background (&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;) color. You may use either a color keyword or an RGB value for each of &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The color and font specifications are described in the appendix. Note that color settings are applied to controls of type &amp;lt;code&amp;gt;static&amp;lt;/code&amp;gt;, and to the caption of controls with a separate caption, window only.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; ] [ /Read|Write ] /Layout | /layout | /Setposition&lt;br /&gt;
&lt;br /&gt;
Set mode, caption, font, position and size of a control&lt;br /&gt;
;/Layout: update control and recompute dialog window layout&lt;br /&gt;
;/layout: update control and recompute dialog window layout, ignore hidden controls&lt;br /&gt;
;Setposition: update control but do not recompute dialog window layout&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;row, col&amp;lt;/var&amp;gt;&lt;br /&gt;
| new control position (use -1 or * if a value should not be changed)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width, height&amp;lt;/var&amp;gt;&lt;br /&gt;
| new control size (use -1 or * if a value should not be changed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;FOCUS&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
&lt;br /&gt;
Give a particular control the input focus. All keyboard input is then directed to the control. This command can be used in setup or input dialogs to set the focus to the default input field after creating and displaying the dialog. If no index is specified or if its value is less than zero, the focus is set to the dialog window itself.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;INPUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; INPUT &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect dialog control with a data output.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
| an SPU output or a value object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;BITMAP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET dialog index BITMAP &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt; ][ /B ]&lt;br /&gt;
&lt;br /&gt;
Assign a bitmap to a button or a static control. The assigned bitmap is displayed in its original size and colors in the center of the control. If no bitmap is specified, any existing assignment is removed. Bitmaps can be read from bitmap files (*.BMP) or from the {{STX}} resource file. To identify a resource the name (or index) of a bitmap resource (no option) or a toolbar button (option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;) can be used.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &#039;button&#039; or &#039;static&#039; dialog control index.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;&lt;br /&gt;
| The bitmap id or toolbar button id. See the &amp;quot;Bitmaps for Dialog Controls, Icons, Toolbar Buttons&amp;quot; topic in &amp;lt;GD&amp;gt; for a list of available b&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a bitmap file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt;&lt;br /&gt;
| If specified, this string will be displayed as a tooltip when the mouse hovers over the button. This parameter overrides any string associated with the bitmap (/b) in the resource file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;&lt;br /&gt;
| If the option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt; is specified, the &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt; references a toolbar button (rather than a bitmap resource). [[Programmer_Guide/General_Descriptions/Bitmaps_for_Dialog_Controls,_Icons,_Toolbar_Buttons|Bitmaps for Dialog Controls, Icons, Toolbar Buttons]] shows all images available in {{STX}}.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET dialog index BITMAP&amp;lt;/code&amp;gt; command only works once a dialog has been created, i.e. after &amp;lt;code&amp;gt;domodaldialog begin&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Creation ==&lt;br /&gt;
&lt;br /&gt;
You can create a control in a dialog using the &amp;lt;code&amp;gt;SET dialog index controlType&amp;lt;/code&amp;gt; commands defined below. All dialog controls must be created before the dialog is displayed for the first time. You can show and hide dialog controls once the dialog has been created with the &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; command. See [[Programmer_Guide/Shell_Items/Dialog/Dialog_Controls|Dialog Controls]] for a list of available controls and their individual creation syntax.&lt;br /&gt;
&lt;br /&gt;
The number of controls per dialog is limited to 255 due to the MFC implementation.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10242</id>
		<title>Programmer Guide/Shell Items/Dialog/SET DIALOG</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10242"/>
		<updated>2018-11-13T15:05:44Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Setting the attributes of a control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Dialog Item}}&lt;br /&gt;
Use the [[Programmer_Guide/Shell_Items/Dialog/NEW_DIALOG|&amp;lt;code&amp;gt;NEW DIALOG&amp;lt;/code&amp;gt;]] command for creating a [[Programmer_Guide/Shell_Items/Dialog|&amp;lt;code&amp;gt;DIALOG&amp;lt;/code&amp;gt; shell item]]. Then apply the &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; commands described here. &lt;br /&gt;
&lt;br /&gt;
== Data Exchange==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
&lt;br /&gt;
Exchange data between the dialog controls and their respective variables.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The optional id of an existing control. If specified, the exchange only takes place for this control. Otherwise, all data for all controls is exchanged.&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The direction of data exchange (as seen from the shell).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; || reads the data out of the control into the shell variable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; || sets the values of the controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you want to read or write only a subset of connected dialog controls, you may do so by using the command&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
See [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Setting_the_attributes_of_a_control|Setting the attributes of a control]] on this page.&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Control ==&lt;br /&gt;
&lt;br /&gt;
Set the display and/or dialog window mode, style position and/or size, and configure the dialog. If the option &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; (dialog &amp;amp;rarr; shell) or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; (shell &amp;amp;rarr; dialog) is specified, a data exchange between the dialog controls and the variables and items bound to the controls is performed. The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; command has different functions for displays with only a dialog and for displays containing a dialog and graphs.&lt;br /&gt;
&lt;br /&gt;
=== Dialog only ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;] [/Centered /Foreground /Dialog /View /Layout|layout]&lt;br /&gt;
&lt;br /&gt;
The dialog is enabled (window is created) and the command is forwarded to the display.&lt;br /&gt;
&lt;br /&gt;
=== Dialog and graphs ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [/Read|Write]&lt;br /&gt;
&lt;br /&gt;
The dialog window mode is set. Other arguments/options are ignored if specified.&lt;br /&gt;
&lt;br /&gt;
=== Options ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The dialog window mode, one out of &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt; is used, the dialog window is destroyed and the dialog must be reconfigured (i.e. controls must be created etc).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt;&lt;br /&gt;
| The window style (&amp;lt;code&amp;gt;MINIMIZE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAXIMIZE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;RESTORE&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;&lt;br /&gt;
|The x-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;&lt;br /&gt;
| The y-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;&lt;br /&gt;
| The height of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Centered&amp;lt;/code&amp;gt;&lt;br /&gt;
| Center the display to the screen in which the mouse is currently. &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; are ignored.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Foreground&amp;lt;/code&amp;gt;&lt;br /&gt;
| Send the window to the front (make the window the topmost window).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Dialog=&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set dialog position inside the display (relative to graphs); changing the position is only possible if the dialog is non-floating. The following values for &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; are allowed: &amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/View=&amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set window view mode to &amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt; (&#039;&amp;lt;code&amp;gt;WINDOW&amp;lt;/code&amp;gt;&#039; is a normal window, or &#039;&amp;lt;code&amp;gt;FULLSCREEN&amp;lt;/code&amp;gt;&#039; = display takes up whole screen (for displays of type &#039;frame&#039; only) or &#039;&amp;lt;code&amp;gt;ALWAYSONTOP&amp;lt;/code&amp;gt;&#039; = the display remains on top, even when other windows are activated).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt;&lt;br /&gt;
| Recalculate the dialog window size, including (&amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; - note the upper-case &amp;amp;quot;L&amp;amp;quot;) or ignoring (&amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt; - note the lower-case &amp;amp;quot;l&amp;amp;quot;) hidden controls (this is one of our very few case-sensitive option letters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Configuration==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; TITLE &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the caption of the display owning the &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;. The caption can be an empty string. Note that it is advisable to surround the string &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; in quotes, since otherwise, only the first word of the string is interpreted as the title (the rest being additional arguments, which are ignored).&lt;br /&gt;
&lt;br /&gt;
Code example:&lt;br /&gt;
 SET $#dlg TITLE &#039;Der Wiener Schnitzel mit de Lavignetten und de Sauerkraut&#039;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;LAYOUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; LAYOUT &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the dialog margins and the default font. The default font will be used for all &#039;&#039;newly&#039;&#039; created controls (the existing ones will keep their respective font). The unit for specifying margins is characters, just like the control position and size. So, if you specify a margin of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;, it will be roughly as wide as a string of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; characters would be (&amp;amp;quot;roughly&amp;amp;quot;, because with proportional fonts, the single characters are of different widths). Note that each control may be assigned an individual font, thereby overriding this default font (see &amp;lt;code&amp;gt;SET dialog index controltype&amp;lt;/code&amp;gt; below).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The default font (see Fonts and Font Arguments for details).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the left/right side (in characters).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the top/bottom (in characters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Context Menus ==&lt;br /&gt;
&lt;br /&gt;
It is possible to attach a set of context menus to each dialog. The displaying of the context menu is controlled by the programmer (normally by processing the messages &amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMSTAT]]&amp;lt;/code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages| and ]]&amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMITEM]]&amp;lt;/code&amp;gt; in a message handler). Context menus are identified by an id string (specified in the &amp;lt;code&amp;gt;ADDPOPUP /X&amp;lt;/code&amp;gt; command) or a zero-based index (in the same order as the &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; commands). Note: If the option /X is not supplied in a command, the menu handling command is forwarded to the display and used for popup-menu handling. For a detailed description of menu item formats and menu item index computation see command &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Display/SET_DISPLAY#ADDPOPUP|SET display ADDPOPUP]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;amp;hellip; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;tableitem&amp;lt;/var&amp;gt; /Table&lt;br /&gt;
&lt;br /&gt;
Add a context menu to the dialog.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt;&lt;br /&gt;
| The id of the context menu in the dialog (a dialog can have more than one context menu). This is not shown in the menu itself.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
| The menu items.&lt;br /&gt;
|-&lt;br /&gt;
|  &amp;lt;var&amp;gt;tableItem&amp;lt;/var&amp;gt;&lt;br /&gt;
| A table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;SETPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; SETPOPUP /X &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Enable|Disable ] [ /Check|Uncheck ]&lt;br /&gt;
&lt;br /&gt;
Activate or deactivate and/or set or clear the check state of menu items &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;. The items may be located in different menus.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;DELPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELPOPUP /X&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELETEPOPUP /X&lt;br /&gt;
&lt;br /&gt;
Delete all context menus. Note that you can replace an existing popup by just calling &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; again with the same index.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;CONTEXTMENU&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; CONTEXTMENU &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Show the contextmenu with index or id &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;. This command is usually called in response to a &amp;lt;code&amp;gt;CMSTAT&amp;lt;/code&amp;gt; message.&lt;br /&gt;
&lt;br /&gt;
== Editing cells in a &amp;lt;code&amp;gt;LISTVIEW&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listviewIndex&amp;lt;/var&amp;gt; STARTEDIT &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the dialog focus to the specified cell and enters edit mode. If the user presses ESC, Return or Enter, the control leaves edit mode. &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; are zero-based indices addressing the field and entry. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the attributes of a control ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
&lt;br /&gt;
Set mode and attributes of a control.&lt;br /&gt;
 &lt;br /&gt;
;/N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;: apply settings to &#039;&#039;all&#039;&#039; controls in a range &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;+count-1&amp;lt;/code&amp;gt;&lt;br /&gt;
;/Read, /Write: request data being transferred from the dialog to the connected shell variable/item (Read), or from the connected shell variable/item to the dialog control (Write) - for a description, see the [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Data_Exchange|Data Exchange]] section on this page. This data exchange will take place for the addressed control(s) only (as opposed to &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; which transfers data to/from &#039;&#039;all&#039;&#039; controls of the dialog).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The index of the (first) control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
| The number of controls (&amp;gt;= 1, default = 1).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control mode (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; is defined for compatibility to earlier versions only. It has the same meaning as &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; (do not change mode, just set attributes).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control caption.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control font. See Fonts and Font Arguments for details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;,&amp;amp;nbsp;&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;&lt;br /&gt;
|The foreground (&amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;) and background (&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;) color. You may use either a color keyword or an RGB value for each of &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The color and font specifications are described in the appendix. Note that color settings are applied to controls of type &amp;lt;code&amp;gt;static&amp;lt;/code&amp;gt;, and to the caption of controls with a separate caption, window only.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; ] [ /Read|Write ] /Layout | /layout | /Setposition&lt;br /&gt;
&lt;br /&gt;
This command can be used to update the caption, font, position and size of a control&lt;br /&gt;
;/Layout: update control and recompute dialog window layout&lt;br /&gt;
;/layout: update control and recompute dialog window layout, ignore hidden controls&lt;br /&gt;
;Setposition: update control but do not recompute dialog window layout&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;row, col&amp;lt;/var&amp;gt;&lt;br /&gt;
| new control position (use -1 or * if a value should not be changed)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width, height&amp;lt;/var&amp;gt;&lt;br /&gt;
| new control size (use -1 or * if a value should not be changed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;FOCUS&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
&lt;br /&gt;
Give a particular control the input focus. All keyboard input is then directed to the control. This command can be used in setup or input dialogs to set the focus to the default input field after creating and displaying the dialog. If no index is specified or if its value is less than zero, the focus is set to the dialog window itself.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;INPUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; INPUT &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect dialog control with a data output.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
| an SPU output or a value object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;BITMAP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET dialog index BITMAP &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt; ][ /B ]&lt;br /&gt;
&lt;br /&gt;
Assign a bitmap to a button or a static control. The assigned bitmap is displayed in its original size and colors in the center of the control. If no bitmap is specified, any existing assignment is removed. Bitmaps can be read from bitmap files (*.BMP) or from the {{STX}} resource file. To identify a resource the name (or index) of a bitmap resource (no option) or a toolbar button (option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;) can be used.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &#039;button&#039; or &#039;static&#039; dialog control index.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;&lt;br /&gt;
| The bitmap id or toolbar button id. See the &amp;quot;Bitmaps for Dialog Controls, Icons, Toolbar Buttons&amp;quot; topic in &amp;lt;GD&amp;gt; for a list of available b&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a bitmap file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt;&lt;br /&gt;
| If specified, this string will be displayed as a tooltip when the mouse hovers over the button. This parameter overrides any string associated with the bitmap (/b) in the resource file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;&lt;br /&gt;
| If the option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt; is specified, the &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt; references a toolbar button (rather than a bitmap resource). [[Programmer_Guide/General_Descriptions/Bitmaps_for_Dialog_Controls,_Icons,_Toolbar_Buttons|Bitmaps for Dialog Controls, Icons, Toolbar Buttons]] shows all images available in {{STX}}.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET dialog index BITMAP&amp;lt;/code&amp;gt; command only works once a dialog has been created, i.e. after &amp;lt;code&amp;gt;domodaldialog begin&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Creation ==&lt;br /&gt;
&lt;br /&gt;
You can create a control in a dialog using the &amp;lt;code&amp;gt;SET dialog index controlType&amp;lt;/code&amp;gt; commands defined below. All dialog controls must be created before the dialog is displayed for the first time. You can show and hide dialog controls once the dialog has been created with the &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; command. See [[Programmer_Guide/Shell_Items/Dialog/Dialog_Controls|Dialog Controls]] for a list of available controls and their individual creation syntax.&lt;br /&gt;
&lt;br /&gt;
The number of controls per dialog is limited to 255 due to the MFC implementation.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10241</id>
		<title>Programmer Guide/Shell Items/Dialog/SET DIALOG</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10241"/>
		<updated>2018-11-13T15:05:09Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Setting the attributes of a control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Dialog Item}}&lt;br /&gt;
Use the [[Programmer_Guide/Shell_Items/Dialog/NEW_DIALOG|&amp;lt;code&amp;gt;NEW DIALOG&amp;lt;/code&amp;gt;]] command for creating a [[Programmer_Guide/Shell_Items/Dialog|&amp;lt;code&amp;gt;DIALOG&amp;lt;/code&amp;gt; shell item]]. Then apply the &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; commands described here. &lt;br /&gt;
&lt;br /&gt;
== Data Exchange==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
&lt;br /&gt;
Exchange data between the dialog controls and their respective variables.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The optional id of an existing control. If specified, the exchange only takes place for this control. Otherwise, all data for all controls is exchanged.&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The direction of data exchange (as seen from the shell).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; || reads the data out of the control into the shell variable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; || sets the values of the controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you want to read or write only a subset of connected dialog controls, you may do so by using the command&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
See [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Setting_the_attributes_of_a_control|Setting the attributes of a control]] on this page.&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Control ==&lt;br /&gt;
&lt;br /&gt;
Set the display and/or dialog window mode, style position and/or size, and configure the dialog. If the option &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; (dialog &amp;amp;rarr; shell) or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; (shell &amp;amp;rarr; dialog) is specified, a data exchange between the dialog controls and the variables and items bound to the controls is performed. The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; command has different functions for displays with only a dialog and for displays containing a dialog and graphs.&lt;br /&gt;
&lt;br /&gt;
=== Dialog only ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;] [/Centered /Foreground /Dialog /View /Layout|layout]&lt;br /&gt;
&lt;br /&gt;
The dialog is enabled (window is created) and the command is forwarded to the display.&lt;br /&gt;
&lt;br /&gt;
=== Dialog and graphs ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [/Read|Write]&lt;br /&gt;
&lt;br /&gt;
The dialog window mode is set. Other arguments/options are ignored if specified.&lt;br /&gt;
&lt;br /&gt;
=== Options ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The dialog window mode, one out of &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt; is used, the dialog window is destroyed and the dialog must be reconfigured (i.e. controls must be created etc).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt;&lt;br /&gt;
| The window style (&amp;lt;code&amp;gt;MINIMIZE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAXIMIZE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;RESTORE&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;&lt;br /&gt;
|The x-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;&lt;br /&gt;
| The y-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;&lt;br /&gt;
| The height of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Centered&amp;lt;/code&amp;gt;&lt;br /&gt;
| Center the display to the screen in which the mouse is currently. &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; are ignored.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Foreground&amp;lt;/code&amp;gt;&lt;br /&gt;
| Send the window to the front (make the window the topmost window).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Dialog=&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set dialog position inside the display (relative to graphs); changing the position is only possible if the dialog is non-floating. The following values for &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; are allowed: &amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/View=&amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set window view mode to &amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt; (&#039;&amp;lt;code&amp;gt;WINDOW&amp;lt;/code&amp;gt;&#039; is a normal window, or &#039;&amp;lt;code&amp;gt;FULLSCREEN&amp;lt;/code&amp;gt;&#039; = display takes up whole screen (for displays of type &#039;frame&#039; only) or &#039;&amp;lt;code&amp;gt;ALWAYSONTOP&amp;lt;/code&amp;gt;&#039; = the display remains on top, even when other windows are activated).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt;&lt;br /&gt;
| Recalculate the dialog window size, including (&amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; - note the upper-case &amp;amp;quot;L&amp;amp;quot;) or ignoring (&amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt; - note the lower-case &amp;amp;quot;l&amp;amp;quot;) hidden controls (this is one of our very few case-sensitive option letters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Configuration==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; TITLE &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the caption of the display owning the &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;. The caption can be an empty string. Note that it is advisable to surround the string &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; in quotes, since otherwise, only the first word of the string is interpreted as the title (the rest being additional arguments, which are ignored).&lt;br /&gt;
&lt;br /&gt;
Code example:&lt;br /&gt;
 SET $#dlg TITLE &#039;Der Wiener Schnitzel mit de Lavignetten und de Sauerkraut&#039;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;LAYOUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; LAYOUT &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the dialog margins and the default font. The default font will be used for all &#039;&#039;newly&#039;&#039; created controls (the existing ones will keep their respective font). The unit for specifying margins is characters, just like the control position and size. So, if you specify a margin of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;, it will be roughly as wide as a string of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; characters would be (&amp;amp;quot;roughly&amp;amp;quot;, because with proportional fonts, the single characters are of different widths). Note that each control may be assigned an individual font, thereby overriding this default font (see &amp;lt;code&amp;gt;SET dialog index controltype&amp;lt;/code&amp;gt; below).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The default font (see Fonts and Font Arguments for details).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the left/right side (in characters).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the top/bottom (in characters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Context Menus ==&lt;br /&gt;
&lt;br /&gt;
It is possible to attach a set of context menus to each dialog. The displaying of the context menu is controlled by the programmer (normally by processing the messages &amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMSTAT]]&amp;lt;/code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages| and ]]&amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMITEM]]&amp;lt;/code&amp;gt; in a message handler). Context menus are identified by an id string (specified in the &amp;lt;code&amp;gt;ADDPOPUP /X&amp;lt;/code&amp;gt; command) or a zero-based index (in the same order as the &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; commands). Note: If the option /X is not supplied in a command, the menu handling command is forwarded to the display and used for popup-menu handling. For a detailed description of menu item formats and menu item index computation see command &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Display/SET_DISPLAY#ADDPOPUP|SET display ADDPOPUP]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;amp;hellip; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;tableitem&amp;lt;/var&amp;gt; /Table&lt;br /&gt;
&lt;br /&gt;
Add a context menu to the dialog.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt;&lt;br /&gt;
| The id of the context menu in the dialog (a dialog can have more than one context menu). This is not shown in the menu itself.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
| The menu items.&lt;br /&gt;
|-&lt;br /&gt;
|  &amp;lt;var&amp;gt;tableItem&amp;lt;/var&amp;gt;&lt;br /&gt;
| A table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;SETPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; SETPOPUP /X &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Enable|Disable ] [ /Check|Uncheck ]&lt;br /&gt;
&lt;br /&gt;
Activate or deactivate and/or set or clear the check state of menu items &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;. The items may be located in different menus.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;DELPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELPOPUP /X&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELETEPOPUP /X&lt;br /&gt;
&lt;br /&gt;
Delete all context menus. Note that you can replace an existing popup by just calling &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; again with the same index.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;CONTEXTMENU&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; CONTEXTMENU &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Show the contextmenu with index or id &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;. This command is usually called in response to a &amp;lt;code&amp;gt;CMSTAT&amp;lt;/code&amp;gt; message.&lt;br /&gt;
&lt;br /&gt;
== Editing cells in a &amp;lt;code&amp;gt;LISTVIEW&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listviewIndex&amp;lt;/var&amp;gt; STARTEDIT &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the dialog focus to the specified cell and enters edit mode. If the user presses ESC, Return or Enter, the control leaves edit mode. &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; are zero-based indices addressing the field and entry. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the attributes of a control ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
&lt;br /&gt;
Set mode and attributes of a control.&lt;br /&gt;
 &lt;br /&gt;
;/N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;: apply settings to &#039;&#039;all&#039;&#039; controls in a range &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;+count-1&amp;lt;/code&amp;gt;&lt;br /&gt;
;/Read, /Write: request data being transferred from the dialog to the connected shell variable (Read), or from the connected shell variable to the dialog control (Write) - for a description, see the [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Data_Exchange|Data Exchange]] section on this page. This data exchange will take place for the addressed control(s) only (as opposed to &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; which transfers data to/from &#039;&#039;all&#039;&#039; controls of the dialog).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The index of the (first) control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
| The number of controls (&amp;gt;= 1, default = 1).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control mode (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; is defined for compatibility to earlier versions only. It has the same meaning as &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; (do not change mode, just set attributes).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control caption.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control font. See Fonts and Font Arguments for details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;,&amp;amp;nbsp;&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;&lt;br /&gt;
|The foreground (&amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;) and background (&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;) color. You may use either a color keyword or an RGB value for each of &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The color and font specifications are described in the appendix. Note that color settings are applied to controls of type &amp;lt;code&amp;gt;static&amp;lt;/code&amp;gt;, and to the caption of controls with a separate caption, window only.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; ] [ /Read|Write ] /Layout | /layout | /Setposition&lt;br /&gt;
&lt;br /&gt;
This command can be used to update the caption, font, position and size of a control&lt;br /&gt;
;/Layout: update control and recompute dialog window layout&lt;br /&gt;
;/layout: update control and recompute dialog window layout, ignore hidden controls&lt;br /&gt;
;Setposition: update control but do not recompute dialog window layout&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;row, col&amp;lt;/var&amp;gt;&lt;br /&gt;
| new control position (use -1 or * if a value should not be changed)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width, height&amp;lt;/var&amp;gt;&lt;br /&gt;
| new control size (use -1 or * if a value should not be changed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;FOCUS&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
&lt;br /&gt;
Give a particular control the input focus. All keyboard input is then directed to the control. This command can be used in setup or input dialogs to set the focus to the default input field after creating and displaying the dialog. If no index is specified or if its value is less than zero, the focus is set to the dialog window itself.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;INPUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; INPUT &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect dialog control with a data output.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
| an SPU output or a value object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;BITMAP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET dialog index BITMAP &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt; ][ /B ]&lt;br /&gt;
&lt;br /&gt;
Assign a bitmap to a button or a static control. The assigned bitmap is displayed in its original size and colors in the center of the control. If no bitmap is specified, any existing assignment is removed. Bitmaps can be read from bitmap files (*.BMP) or from the {{STX}} resource file. To identify a resource the name (or index) of a bitmap resource (no option) or a toolbar button (option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;) can be used.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &#039;button&#039; or &#039;static&#039; dialog control index.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;&lt;br /&gt;
| The bitmap id or toolbar button id. See the &amp;quot;Bitmaps for Dialog Controls, Icons, Toolbar Buttons&amp;quot; topic in &amp;lt;GD&amp;gt; for a list of available b&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a bitmap file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt;&lt;br /&gt;
| If specified, this string will be displayed as a tooltip when the mouse hovers over the button. This parameter overrides any string associated with the bitmap (/b) in the resource file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;&lt;br /&gt;
| If the option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt; is specified, the &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt; references a toolbar button (rather than a bitmap resource). [[Programmer_Guide/General_Descriptions/Bitmaps_for_Dialog_Controls,_Icons,_Toolbar_Buttons|Bitmaps for Dialog Controls, Icons, Toolbar Buttons]] shows all images available in {{STX}}.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET dialog index BITMAP&amp;lt;/code&amp;gt; command only works once a dialog has been created, i.e. after &amp;lt;code&amp;gt;domodaldialog begin&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Creation ==&lt;br /&gt;
&lt;br /&gt;
You can create a control in a dialog using the &amp;lt;code&amp;gt;SET dialog index controlType&amp;lt;/code&amp;gt; commands defined below. All dialog controls must be created before the dialog is displayed for the first time. You can show and hide dialog controls once the dialog has been created with the &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; command. See [[Programmer_Guide/Shell_Items/Dialog/Dialog_Controls|Dialog Controls]] for a list of available controls and their individual creation syntax.&lt;br /&gt;
&lt;br /&gt;
The number of controls per dialog is limited to 255 due to the MFC implementation.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10240</id>
		<title>Programmer Guide/Shell Items/Dialog/SET DIALOG</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10240"/>
		<updated>2018-11-13T15:04:37Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Setting the attributes of a control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Dialog Item}}&lt;br /&gt;
Use the [[Programmer_Guide/Shell_Items/Dialog/NEW_DIALOG|&amp;lt;code&amp;gt;NEW DIALOG&amp;lt;/code&amp;gt;]] command for creating a [[Programmer_Guide/Shell_Items/Dialog|&amp;lt;code&amp;gt;DIALOG&amp;lt;/code&amp;gt; shell item]]. Then apply the &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; commands described here. &lt;br /&gt;
&lt;br /&gt;
== Data Exchange==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
&lt;br /&gt;
Exchange data between the dialog controls and their respective variables.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The optional id of an existing control. If specified, the exchange only takes place for this control. Otherwise, all data for all controls is exchanged.&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The direction of data exchange (as seen from the shell).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; || reads the data out of the control into the shell variable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; || sets the values of the controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you want to read or write only a subset of connected dialog controls, you may do so by using the command&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
See [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Setting_the_attributes_of_a_control|Setting the attributes of a control]] on this page.&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Control ==&lt;br /&gt;
&lt;br /&gt;
Set the display and/or dialog window mode, style position and/or size, and configure the dialog. If the option &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; (dialog &amp;amp;rarr; shell) or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; (shell &amp;amp;rarr; dialog) is specified, a data exchange between the dialog controls and the variables and items bound to the controls is performed. The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; command has different functions for displays with only a dialog and for displays containing a dialog and graphs.&lt;br /&gt;
&lt;br /&gt;
=== Dialog only ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;] [/Centered /Foreground /Dialog /View /Layout|layout]&lt;br /&gt;
&lt;br /&gt;
The dialog is enabled (window is created) and the command is forwarded to the display.&lt;br /&gt;
&lt;br /&gt;
=== Dialog and graphs ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [/Read|Write]&lt;br /&gt;
&lt;br /&gt;
The dialog window mode is set. Other arguments/options are ignored if specified.&lt;br /&gt;
&lt;br /&gt;
=== Options ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The dialog window mode, one out of &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt; is used, the dialog window is destroyed and the dialog must be reconfigured (i.e. controls must be created etc).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt;&lt;br /&gt;
| The window style (&amp;lt;code&amp;gt;MINIMIZE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAXIMIZE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;RESTORE&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;&lt;br /&gt;
|The x-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;&lt;br /&gt;
| The y-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;&lt;br /&gt;
| The height of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Centered&amp;lt;/code&amp;gt;&lt;br /&gt;
| Center the display to the screen in which the mouse is currently. &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; are ignored.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Foreground&amp;lt;/code&amp;gt;&lt;br /&gt;
| Send the window to the front (make the window the topmost window).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Dialog=&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set dialog position inside the display (relative to graphs); changing the position is only possible if the dialog is non-floating. The following values for &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; are allowed: &amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/View=&amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set window view mode to &amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt; (&#039;&amp;lt;code&amp;gt;WINDOW&amp;lt;/code&amp;gt;&#039; is a normal window, or &#039;&amp;lt;code&amp;gt;FULLSCREEN&amp;lt;/code&amp;gt;&#039; = display takes up whole screen (for displays of type &#039;frame&#039; only) or &#039;&amp;lt;code&amp;gt;ALWAYSONTOP&amp;lt;/code&amp;gt;&#039; = the display remains on top, even when other windows are activated).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt;&lt;br /&gt;
| Recalculate the dialog window size, including (&amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; - note the upper-case &amp;amp;quot;L&amp;amp;quot;) or ignoring (&amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt; - note the lower-case &amp;amp;quot;l&amp;amp;quot;) hidden controls (this is one of our very few case-sensitive option letters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Configuration==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; TITLE &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the caption of the display owning the &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;. The caption can be an empty string. Note that it is advisable to surround the string &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; in quotes, since otherwise, only the first word of the string is interpreted as the title (the rest being additional arguments, which are ignored).&lt;br /&gt;
&lt;br /&gt;
Code example:&lt;br /&gt;
 SET $#dlg TITLE &#039;Der Wiener Schnitzel mit de Lavignetten und de Sauerkraut&#039;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;LAYOUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; LAYOUT &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the dialog margins and the default font. The default font will be used for all &#039;&#039;newly&#039;&#039; created controls (the existing ones will keep their respective font). The unit for specifying margins is characters, just like the control position and size. So, if you specify a margin of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;, it will be roughly as wide as a string of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; characters would be (&amp;amp;quot;roughly&amp;amp;quot;, because with proportional fonts, the single characters are of different widths). Note that each control may be assigned an individual font, thereby overriding this default font (see &amp;lt;code&amp;gt;SET dialog index controltype&amp;lt;/code&amp;gt; below).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The default font (see Fonts and Font Arguments for details).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the left/right side (in characters).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the top/bottom (in characters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Context Menus ==&lt;br /&gt;
&lt;br /&gt;
It is possible to attach a set of context menus to each dialog. The displaying of the context menu is controlled by the programmer (normally by processing the messages &amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMSTAT]]&amp;lt;/code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages| and ]]&amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMITEM]]&amp;lt;/code&amp;gt; in a message handler). Context menus are identified by an id string (specified in the &amp;lt;code&amp;gt;ADDPOPUP /X&amp;lt;/code&amp;gt; command) or a zero-based index (in the same order as the &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; commands). Note: If the option /X is not supplied in a command, the menu handling command is forwarded to the display and used for popup-menu handling. For a detailed description of menu item formats and menu item index computation see command &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Display/SET_DISPLAY#ADDPOPUP|SET display ADDPOPUP]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;amp;hellip; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;tableitem&amp;lt;/var&amp;gt; /Table&lt;br /&gt;
&lt;br /&gt;
Add a context menu to the dialog.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt;&lt;br /&gt;
| The id of the context menu in the dialog (a dialog can have more than one context menu). This is not shown in the menu itself.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
| The menu items.&lt;br /&gt;
|-&lt;br /&gt;
|  &amp;lt;var&amp;gt;tableItem&amp;lt;/var&amp;gt;&lt;br /&gt;
| A table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;SETPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; SETPOPUP /X &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Enable|Disable ] [ /Check|Uncheck ]&lt;br /&gt;
&lt;br /&gt;
Activate or deactivate and/or set or clear the check state of menu items &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;. The items may be located in different menus.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;DELPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELPOPUP /X&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELETEPOPUP /X&lt;br /&gt;
&lt;br /&gt;
Delete all context menus. Note that you can replace an existing popup by just calling &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; again with the same index.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;CONTEXTMENU&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; CONTEXTMENU &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Show the contextmenu with index or id &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;. This command is usually called in response to a &amp;lt;code&amp;gt;CMSTAT&amp;lt;/code&amp;gt; message.&lt;br /&gt;
&lt;br /&gt;
== Editing cells in a &amp;lt;code&amp;gt;LISTVIEW&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listviewIndex&amp;lt;/var&amp;gt; STARTEDIT &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the dialog focus to the specified cell and enters edit mode. If the user presses ESC, Return or Enter, the control leaves edit mode. &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; are zero-based indices addressing the field and entry. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the attributes of a control ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
&lt;br /&gt;
Set mode and attributes of a control.&lt;br /&gt;
 &lt;br /&gt;
;/N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;: apply settings to &#039;&#039;all&#039;&#039; controls in a range &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;+count-1&amp;lt;/code&amp;gt;&lt;br /&gt;
;/Read, /Write: request data being transferred from the dialog to the connected shell variable (Read), or from the connected shell variable to the dialog control (Write) - for a description, see the [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Data_Exchange|Data Exchange]] section on this page. This data exchange will take place for the addressed control(s) only (as opposed to &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; which transfers data to/from &#039;&#039;all&#039;&#039; controls of the dialog).&lt;br /&gt;
&lt;br /&gt;
The color and font specifications are described in the appendix. Note that color settings are applied to controls of type &amp;lt;code&amp;gt;static&amp;lt;/code&amp;gt;, and to the caption of controls with a separate caption, window only.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The index of the (first) control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
| The number of controls (&amp;gt;= 1, default = 1).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control mode (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; is defined for compatibility to earlier versions only. It has the same meaning as &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; (do not change mode, just set attributes).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control caption.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control font. See Fonts and Font Arguments for details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;,&amp;amp;nbsp;&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;&lt;br /&gt;
|The foreground (&amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;) and background (&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;) color. You may use either a color keyword or an RGB value for each of &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; ] [ /Read|Write ] /Layout | /layout | /Setposition&lt;br /&gt;
&lt;br /&gt;
This command can be used to update the caption, font, position and size of a control&lt;br /&gt;
;/Layout: update control and recompute dialog window layout&lt;br /&gt;
;/layout: update control and recompute dialog window layout, ignore hidden controls&lt;br /&gt;
;Setposition: update control but do not recompute dialog window layout&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;row, col&amp;lt;/var&amp;gt;&lt;br /&gt;
| new control position (use -1 or * if a value should not be changed)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width, height&amp;lt;/var&amp;gt;&lt;br /&gt;
| new control size (use -1 or * if a value should not be changed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;FOCUS&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
&lt;br /&gt;
Give a particular control the input focus. All keyboard input is then directed to the control. This command can be used in setup or input dialogs to set the focus to the default input field after creating and displaying the dialog. If no index is specified or if its value is less than zero, the focus is set to the dialog window itself.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;INPUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; INPUT &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect dialog control with a data output.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
| an SPU output or a value object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;BITMAP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET dialog index BITMAP &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt; ][ /B ]&lt;br /&gt;
&lt;br /&gt;
Assign a bitmap to a button or a static control. The assigned bitmap is displayed in its original size and colors in the center of the control. If no bitmap is specified, any existing assignment is removed. Bitmaps can be read from bitmap files (*.BMP) or from the {{STX}} resource file. To identify a resource the name (or index) of a bitmap resource (no option) or a toolbar button (option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;) can be used.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &#039;button&#039; or &#039;static&#039; dialog control index.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;&lt;br /&gt;
| The bitmap id or toolbar button id. See the &amp;quot;Bitmaps for Dialog Controls, Icons, Toolbar Buttons&amp;quot; topic in &amp;lt;GD&amp;gt; for a list of available b&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a bitmap file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt;&lt;br /&gt;
| If specified, this string will be displayed as a tooltip when the mouse hovers over the button. This parameter overrides any string associated with the bitmap (/b) in the resource file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;&lt;br /&gt;
| If the option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt; is specified, the &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt; references a toolbar button (rather than a bitmap resource). [[Programmer_Guide/General_Descriptions/Bitmaps_for_Dialog_Controls,_Icons,_Toolbar_Buttons|Bitmaps for Dialog Controls, Icons, Toolbar Buttons]] shows all images available in {{STX}}.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET dialog index BITMAP&amp;lt;/code&amp;gt; command only works once a dialog has been created, i.e. after &amp;lt;code&amp;gt;domodaldialog begin&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Creation ==&lt;br /&gt;
&lt;br /&gt;
You can create a control in a dialog using the &amp;lt;code&amp;gt;SET dialog index controlType&amp;lt;/code&amp;gt; commands defined below. All dialog controls must be created before the dialog is displayed for the first time. You can show and hide dialog controls once the dialog has been created with the &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; command. See [[Programmer_Guide/Shell_Items/Dialog/Dialog_Controls|Dialog Controls]] for a list of available controls and their individual creation syntax.&lt;br /&gt;
&lt;br /&gt;
The number of controls per dialog is limited to 255 due to the MFC implementation.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10239</id>
		<title>Programmer Guide/Shell Items/Dialog/SET DIALOG</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10239"/>
		<updated>2018-11-13T14:58:17Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Setting the attributes of a control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Dialog Item}}&lt;br /&gt;
Use the [[Programmer_Guide/Shell_Items/Dialog/NEW_DIALOG|&amp;lt;code&amp;gt;NEW DIALOG&amp;lt;/code&amp;gt;]] command for creating a [[Programmer_Guide/Shell_Items/Dialog|&amp;lt;code&amp;gt;DIALOG&amp;lt;/code&amp;gt; shell item]]. Then apply the &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; commands described here. &lt;br /&gt;
&lt;br /&gt;
== Data Exchange==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
&lt;br /&gt;
Exchange data between the dialog controls and their respective variables.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The optional id of an existing control. If specified, the exchange only takes place for this control. Otherwise, all data for all controls is exchanged.&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The direction of data exchange (as seen from the shell).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; || reads the data out of the control into the shell variable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; || sets the values of the controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you want to read or write only a subset of connected dialog controls, you may do so by using the command&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
See [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Setting_the_attributes_of_a_control|Setting the attributes of a control]] on this page.&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Control ==&lt;br /&gt;
&lt;br /&gt;
Set the display and/or dialog window mode, style position and/or size, and configure the dialog. If the option &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; (dialog &amp;amp;rarr; shell) or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; (shell &amp;amp;rarr; dialog) is specified, a data exchange between the dialog controls and the variables and items bound to the controls is performed. The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; command has different functions for displays with only a dialog and for displays containing a dialog and graphs.&lt;br /&gt;
&lt;br /&gt;
=== Dialog only ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;] [/Centered /Foreground /Dialog /View /Layout|layout]&lt;br /&gt;
&lt;br /&gt;
The dialog is enabled (window is created) and the command is forwarded to the display.&lt;br /&gt;
&lt;br /&gt;
=== Dialog and graphs ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [/Read|Write]&lt;br /&gt;
&lt;br /&gt;
The dialog window mode is set. Other arguments/options are ignored if specified.&lt;br /&gt;
&lt;br /&gt;
=== Options ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The dialog window mode, one out of &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt; is used, the dialog window is destroyed and the dialog must be reconfigured (i.e. controls must be created etc).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt;&lt;br /&gt;
| The window style (&amp;lt;code&amp;gt;MINIMIZE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAXIMIZE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;RESTORE&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;&lt;br /&gt;
|The x-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;&lt;br /&gt;
| The y-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;&lt;br /&gt;
| The height of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Centered&amp;lt;/code&amp;gt;&lt;br /&gt;
| Center the display to the screen in which the mouse is currently. &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; are ignored.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Foreground&amp;lt;/code&amp;gt;&lt;br /&gt;
| Send the window to the front (make the window the topmost window).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Dialog=&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set dialog position inside the display (relative to graphs); changing the position is only possible if the dialog is non-floating. The following values for &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; are allowed: &amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/View=&amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set window view mode to &amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt; (&#039;&amp;lt;code&amp;gt;WINDOW&amp;lt;/code&amp;gt;&#039; is a normal window, or &#039;&amp;lt;code&amp;gt;FULLSCREEN&amp;lt;/code&amp;gt;&#039; = display takes up whole screen (for displays of type &#039;frame&#039; only) or &#039;&amp;lt;code&amp;gt;ALWAYSONTOP&amp;lt;/code&amp;gt;&#039; = the display remains on top, even when other windows are activated).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt;&lt;br /&gt;
| Recalculate the dialog window size, including (&amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; - note the upper-case &amp;amp;quot;L&amp;amp;quot;) or ignoring (&amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt; - note the lower-case &amp;amp;quot;l&amp;amp;quot;) hidden controls (this is one of our very few case-sensitive option letters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Configuration==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; TITLE &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the caption of the display owning the &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;. The caption can be an empty string. Note that it is advisable to surround the string &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; in quotes, since otherwise, only the first word of the string is interpreted as the title (the rest being additional arguments, which are ignored).&lt;br /&gt;
&lt;br /&gt;
Code example:&lt;br /&gt;
 SET $#dlg TITLE &#039;Der Wiener Schnitzel mit de Lavignetten und de Sauerkraut&#039;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;LAYOUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; LAYOUT &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the dialog margins and the default font. The default font will be used for all &#039;&#039;newly&#039;&#039; created controls (the existing ones will keep their respective font). The unit for specifying margins is characters, just like the control position and size. So, if you specify a margin of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;, it will be roughly as wide as a string of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; characters would be (&amp;amp;quot;roughly&amp;amp;quot;, because with proportional fonts, the single characters are of different widths). Note that each control may be assigned an individual font, thereby overriding this default font (see &amp;lt;code&amp;gt;SET dialog index controltype&amp;lt;/code&amp;gt; below).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The default font (see Fonts and Font Arguments for details).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the left/right side (in characters).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the top/bottom (in characters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Context Menus ==&lt;br /&gt;
&lt;br /&gt;
It is possible to attach a set of context menus to each dialog. The displaying of the context menu is controlled by the programmer (normally by processing the messages &amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMSTAT]]&amp;lt;/code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages| and ]]&amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMITEM]]&amp;lt;/code&amp;gt; in a message handler). Context menus are identified by an id string (specified in the &amp;lt;code&amp;gt;ADDPOPUP /X&amp;lt;/code&amp;gt; command) or a zero-based index (in the same order as the &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; commands). Note: If the option /X is not supplied in a command, the menu handling command is forwarded to the display and used for popup-menu handling. For a detailed description of menu item formats and menu item index computation see command &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Display/SET_DISPLAY#ADDPOPUP|SET display ADDPOPUP]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;amp;hellip; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;tableitem&amp;lt;/var&amp;gt; /Table&lt;br /&gt;
&lt;br /&gt;
Add a context menu to the dialog.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt;&lt;br /&gt;
| The id of the context menu in the dialog (a dialog can have more than one context menu). This is not shown in the menu itself.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
| The menu items.&lt;br /&gt;
|-&lt;br /&gt;
|  &amp;lt;var&amp;gt;tableItem&amp;lt;/var&amp;gt;&lt;br /&gt;
| A table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;SETPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; SETPOPUP /X &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Enable|Disable ] [ /Check|Uncheck ]&lt;br /&gt;
&lt;br /&gt;
Activate or deactivate and/or set or clear the check state of menu items &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;. The items may be located in different menus.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;DELPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELPOPUP /X&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELETEPOPUP /X&lt;br /&gt;
&lt;br /&gt;
Delete all context menus. Note that you can replace an existing popup by just calling &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; again with the same index.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;CONTEXTMENU&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; CONTEXTMENU &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Show the contextmenu with index or id &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;. This command is usually called in response to a &amp;lt;code&amp;gt;CMSTAT&amp;lt;/code&amp;gt; message.&lt;br /&gt;
&lt;br /&gt;
== Editing cells in a &amp;lt;code&amp;gt;LISTVIEW&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listviewIndex&amp;lt;/var&amp;gt; STARTEDIT &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the dialog focus to the specified cell and enters edit mode. If the user presses ESC, Return or Enter, the control leaves edit mode. &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; are zero-based indices addressing the field and entry. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the attributes of a control ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
&lt;br /&gt;
Set mode and attributes of a control.&lt;br /&gt;
 &lt;br /&gt;
The option &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; may be used to apply settings to &#039;&#039;all&#039;&#039; controls in a range &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;+count-1&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The options &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; request data being transferred from the dialog to the connected shell variable (&amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt;), or from the connected shell variable to the dialog control (&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;) - for a description, see the [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Data_Exchange|Data Exchange]] section on this page. This data exchange will take place for the addressed control(s) only (as opposed to &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; which transfers data to/from &#039;&#039;all&#039;&#039; controls of the dialog).&lt;br /&gt;
&lt;br /&gt;
The color and font specifications are described in the appendix. Note that color settings are applied to controls of type &amp;lt;code&amp;gt;static&amp;lt;/code&amp;gt;, and to the caption of controls with a separate caption, window only.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The index of the (first) control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
| The number of controls (&amp;gt;= 1, default = 1).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control mode (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; is defined for compatibility to earlier versions only. It has the same meaning as &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; (do not change mode, just set attributes).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control caption.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control font. See Fonts and Font Arguments for details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;,&amp;amp;nbsp;&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;&lt;br /&gt;
|The foreground (&amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;) and background (&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;) color. You may use either a color keyword or an RGB value for each of &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; ] [ /Read|Write ] /Layout | /layout | /Setposition&lt;br /&gt;
&lt;br /&gt;
This command can be used to update the caption, font, position and size of a control&lt;br /&gt;
;/Layout: update control and recompute dialog window layout&lt;br /&gt;
;/layout: update control and recompute dialog window layout, ignore hidden controls&lt;br /&gt;
;Setposition: update control but do not recompute dialog window layout&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;row, col&amp;lt;/var&amp;gt;&lt;br /&gt;
| new control position (use -1 or * if a value should not be changed)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width, height&amp;lt;/var&amp;gt;&lt;br /&gt;
| new control size (use -1 or * if a value should not be changed)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;FOCUS&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
&lt;br /&gt;
Give a particular control the input focus. All keyboard input is then directed to the control. This command can be used in setup or input dialogs to set the focus to the default input field after creating and displaying the dialog. If no index is specified or if its value is less than zero, the focus is set to the dialog window itself.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;INPUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; INPUT &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect dialog control with a data output.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
| an SPU output or a value object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;BITMAP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET dialog index BITMAP &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt; ][ /B ]&lt;br /&gt;
&lt;br /&gt;
Assign a bitmap to a button or a static control. The assigned bitmap is displayed in its original size and colors in the center of the control. If no bitmap is specified, any existing assignment is removed. Bitmaps can be read from bitmap files (*.BMP) or from the {{STX}} resource file. To identify a resource the name (or index) of a bitmap resource (no option) or a toolbar button (option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;) can be used.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &#039;button&#039; or &#039;static&#039; dialog control index.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;&lt;br /&gt;
| The bitmap id or toolbar button id. See the &amp;quot;Bitmaps for Dialog Controls, Icons, Toolbar Buttons&amp;quot; topic in &amp;lt;GD&amp;gt; for a list of available b&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a bitmap file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt;&lt;br /&gt;
| If specified, this string will be displayed as a tooltip when the mouse hovers over the button. This parameter overrides any string associated with the bitmap (/b) in the resource file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;&lt;br /&gt;
| If the option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt; is specified, the &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt; references a toolbar button (rather than a bitmap resource). [[Programmer_Guide/General_Descriptions/Bitmaps_for_Dialog_Controls,_Icons,_Toolbar_Buttons|Bitmaps for Dialog Controls, Icons, Toolbar Buttons]] shows all images available in {{STX}}.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET dialog index BITMAP&amp;lt;/code&amp;gt; command only works once a dialog has been created, i.e. after &amp;lt;code&amp;gt;domodaldialog begin&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Creation ==&lt;br /&gt;
&lt;br /&gt;
You can create a control in a dialog using the &amp;lt;code&amp;gt;SET dialog index controlType&amp;lt;/code&amp;gt; commands defined below. All dialog controls must be created before the dialog is displayed for the first time. You can show and hide dialog controls once the dialog has been created with the &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; command. See [[Programmer_Guide/Shell_Items/Dialog/Dialog_Controls|Dialog Controls]] for a list of available controls and their individual creation syntax.&lt;br /&gt;
&lt;br /&gt;
The number of controls per dialog is limited to 255 due to the MFC implementation.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10238</id>
		<title>Programmer Guide/Shell Items/Dialog/SET DIALOG</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10238"/>
		<updated>2018-11-13T14:53:27Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Setting the attributes of a control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Dialog Item}}&lt;br /&gt;
Use the [[Programmer_Guide/Shell_Items/Dialog/NEW_DIALOG|&amp;lt;code&amp;gt;NEW DIALOG&amp;lt;/code&amp;gt;]] command for creating a [[Programmer_Guide/Shell_Items/Dialog|&amp;lt;code&amp;gt;DIALOG&amp;lt;/code&amp;gt; shell item]]. Then apply the &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; commands described here. &lt;br /&gt;
&lt;br /&gt;
== Data Exchange==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
&lt;br /&gt;
Exchange data between the dialog controls and their respective variables.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The optional id of an existing control. If specified, the exchange only takes place for this control. Otherwise, all data for all controls is exchanged.&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The direction of data exchange (as seen from the shell).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; || reads the data out of the control into the shell variable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; || sets the values of the controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you want to read or write only a subset of connected dialog controls, you may do so by using the command&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
See [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Setting_the_attributes_of_a_control|Setting the attributes of a control]] on this page.&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Control ==&lt;br /&gt;
&lt;br /&gt;
Set the display and/or dialog window mode, style position and/or size, and configure the dialog. If the option &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; (dialog &amp;amp;rarr; shell) or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; (shell &amp;amp;rarr; dialog) is specified, a data exchange between the dialog controls and the variables and items bound to the controls is performed. The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; command has different functions for displays with only a dialog and for displays containing a dialog and graphs.&lt;br /&gt;
&lt;br /&gt;
=== Dialog only ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;] [/Centered /Foreground /Dialog /View /Layout|layout]&lt;br /&gt;
&lt;br /&gt;
The dialog is enabled (window is created) and the command is forwarded to the display.&lt;br /&gt;
&lt;br /&gt;
=== Dialog and graphs ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [/Read|Write]&lt;br /&gt;
&lt;br /&gt;
The dialog window mode is set. Other arguments/options are ignored if specified.&lt;br /&gt;
&lt;br /&gt;
=== Options ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The dialog window mode, one out of &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt; is used, the dialog window is destroyed and the dialog must be reconfigured (i.e. controls must be created etc).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt;&lt;br /&gt;
| The window style (&amp;lt;code&amp;gt;MINIMIZE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAXIMIZE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;RESTORE&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;&lt;br /&gt;
|The x-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;&lt;br /&gt;
| The y-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;&lt;br /&gt;
| The height of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Centered&amp;lt;/code&amp;gt;&lt;br /&gt;
| Center the display to the screen in which the mouse is currently. &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; are ignored.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Foreground&amp;lt;/code&amp;gt;&lt;br /&gt;
| Send the window to the front (make the window the topmost window).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Dialog=&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set dialog position inside the display (relative to graphs); changing the position is only possible if the dialog is non-floating. The following values for &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; are allowed: &amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/View=&amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set window view mode to &amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt; (&#039;&amp;lt;code&amp;gt;WINDOW&amp;lt;/code&amp;gt;&#039; is a normal window, or &#039;&amp;lt;code&amp;gt;FULLSCREEN&amp;lt;/code&amp;gt;&#039; = display takes up whole screen (for displays of type &#039;frame&#039; only) or &#039;&amp;lt;code&amp;gt;ALWAYSONTOP&amp;lt;/code&amp;gt;&#039; = the display remains on top, even when other windows are activated).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt;&lt;br /&gt;
| Recalculate the dialog window size, including (&amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; - note the upper-case &amp;amp;quot;L&amp;amp;quot;) or ignoring (&amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt; - note the lower-case &amp;amp;quot;l&amp;amp;quot;) hidden controls (this is one of our very few case-sensitive option letters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Configuration==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; TITLE &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the caption of the display owning the &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;. The caption can be an empty string. Note that it is advisable to surround the string &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; in quotes, since otherwise, only the first word of the string is interpreted as the title (the rest being additional arguments, which are ignored).&lt;br /&gt;
&lt;br /&gt;
Code example:&lt;br /&gt;
 SET $#dlg TITLE &#039;Der Wiener Schnitzel mit de Lavignetten und de Sauerkraut&#039;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;LAYOUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; LAYOUT &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the dialog margins and the default font. The default font will be used for all &#039;&#039;newly&#039;&#039; created controls (the existing ones will keep their respective font). The unit for specifying margins is characters, just like the control position and size. So, if you specify a margin of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;, it will be roughly as wide as a string of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; characters would be (&amp;amp;quot;roughly&amp;amp;quot;, because with proportional fonts, the single characters are of different widths). Note that each control may be assigned an individual font, thereby overriding this default font (see &amp;lt;code&amp;gt;SET dialog index controltype&amp;lt;/code&amp;gt; below).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The default font (see Fonts and Font Arguments for details).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the left/right side (in characters).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the top/bottom (in characters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Context Menus ==&lt;br /&gt;
&lt;br /&gt;
It is possible to attach a set of context menus to each dialog. The displaying of the context menu is controlled by the programmer (normally by processing the messages &amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMSTAT]]&amp;lt;/code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages| and ]]&amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMITEM]]&amp;lt;/code&amp;gt; in a message handler). Context menus are identified by an id string (specified in the &amp;lt;code&amp;gt;ADDPOPUP /X&amp;lt;/code&amp;gt; command) or a zero-based index (in the same order as the &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; commands). Note: If the option /X is not supplied in a command, the menu handling command is forwarded to the display and used for popup-menu handling. For a detailed description of menu item formats and menu item index computation see command &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Display/SET_DISPLAY#ADDPOPUP|SET display ADDPOPUP]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;amp;hellip; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;tableitem&amp;lt;/var&amp;gt; /Table&lt;br /&gt;
&lt;br /&gt;
Add a context menu to the dialog.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt;&lt;br /&gt;
| The id of the context menu in the dialog (a dialog can have more than one context menu). This is not shown in the menu itself.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
| The menu items.&lt;br /&gt;
|-&lt;br /&gt;
|  &amp;lt;var&amp;gt;tableItem&amp;lt;/var&amp;gt;&lt;br /&gt;
| A table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;SETPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; SETPOPUP /X &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Enable|Disable ] [ /Check|Uncheck ]&lt;br /&gt;
&lt;br /&gt;
Activate or deactivate and/or set or clear the check state of menu items &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;. The items may be located in different menus.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;DELPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELPOPUP /X&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELETEPOPUP /X&lt;br /&gt;
&lt;br /&gt;
Delete all context menus. Note that you can replace an existing popup by just calling &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; again with the same index.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;CONTEXTMENU&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; CONTEXTMENU &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Show the contextmenu with index or id &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;. This command is usually called in response to a &amp;lt;code&amp;gt;CMSTAT&amp;lt;/code&amp;gt; message.&lt;br /&gt;
&lt;br /&gt;
== Editing cells in a &amp;lt;code&amp;gt;LISTVIEW&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listviewIndex&amp;lt;/var&amp;gt; STARTEDIT &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the dialog focus to the specified cell and enters edit mode. If the user presses ESC, Return or Enter, the control leaves edit mode. &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; are zero-based indices addressing the field and entry. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the attributes of a control ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
&lt;br /&gt;
Set mode and attributes of a control.&lt;br /&gt;
 &lt;br /&gt;
The option &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; may be used to apply settings to &#039;&#039;all&#039;&#039; controls in a range &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;+count-1&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The options &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; request data being transferred from the dialog to the connected shell variable (&amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt;), or from the connected shell variable to the dialog control (&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;) - for a description, see the [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Data_Exchange|Data Exchange]] section on this page. This data exchange will take place for the addressed control(s) only (as opposed to &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; which transfers data to/from &#039;&#039;all&#039;&#039; controls of the dialog).&lt;br /&gt;
&lt;br /&gt;
The color and font specifications are described in the appendix. Note that color settings are applied to controls of type &amp;lt;code&amp;gt;static&amp;lt;/code&amp;gt;, and to the caption of controls with a separate caption, window only.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The index of the (first) control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
| The number of controls (&amp;gt;= 1, default = 1).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control mode (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; is defined for compatibility to earlier versions only. It has the same meaning as &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; (do not change mode, just set attributes).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control caption.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control font. See Fonts and Font Arguments for details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;,&amp;amp;nbsp;&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;&lt;br /&gt;
|The foreground (&amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;) and background (&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;) color. You may use either a color keyword or an RGB value for each of &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; ] [ /Read|Write ] /Layout | /layout | /Setposition&lt;br /&gt;
&lt;br /&gt;
This command can be used to update the caption, font, position and size of a control&lt;br /&gt;
;/Layout: update control and recompute dialog window layout&lt;br /&gt;
;/layout: update control and recompute dialog window layout, ignore hidden controls&lt;br /&gt;
;Setposition: update control but do not recompute dialog window layout&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;FOCUS&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
&lt;br /&gt;
Give a particular control the input focus. All keyboard input is then directed to the control. This command can be used in setup or input dialogs to set the focus to the default input field after creating and displaying the dialog. If no index is specified or if its value is less than zero, the focus is set to the dialog window itself.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;INPUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; INPUT &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect dialog control with a data output.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
| an SPU output or a value object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;BITMAP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET dialog index BITMAP &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt; ][ /B ]&lt;br /&gt;
&lt;br /&gt;
Assign a bitmap to a button or a static control. The assigned bitmap is displayed in its original size and colors in the center of the control. If no bitmap is specified, any existing assignment is removed. Bitmaps can be read from bitmap files (*.BMP) or from the {{STX}} resource file. To identify a resource the name (or index) of a bitmap resource (no option) or a toolbar button (option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;) can be used.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &#039;button&#039; or &#039;static&#039; dialog control index.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;&lt;br /&gt;
| The bitmap id or toolbar button id. See the &amp;quot;Bitmaps for Dialog Controls, Icons, Toolbar Buttons&amp;quot; topic in &amp;lt;GD&amp;gt; for a list of available b&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a bitmap file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt;&lt;br /&gt;
| If specified, this string will be displayed as a tooltip when the mouse hovers over the button. This parameter overrides any string associated with the bitmap (/b) in the resource file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;&lt;br /&gt;
| If the option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt; is specified, the &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt; references a toolbar button (rather than a bitmap resource). [[Programmer_Guide/General_Descriptions/Bitmaps_for_Dialog_Controls,_Icons,_Toolbar_Buttons|Bitmaps for Dialog Controls, Icons, Toolbar Buttons]] shows all images available in {{STX}}.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET dialog index BITMAP&amp;lt;/code&amp;gt; command only works once a dialog has been created, i.e. after &amp;lt;code&amp;gt;domodaldialog begin&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Creation ==&lt;br /&gt;
&lt;br /&gt;
You can create a control in a dialog using the &amp;lt;code&amp;gt;SET dialog index controlType&amp;lt;/code&amp;gt; commands defined below. All dialog controls must be created before the dialog is displayed for the first time. You can show and hide dialog controls once the dialog has been created with the &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; command. See [[Programmer_Guide/Shell_Items/Dialog/Dialog_Controls|Dialog Controls]] for a list of available controls and their individual creation syntax.&lt;br /&gt;
&lt;br /&gt;
The number of controls per dialog is limited to 255 due to the MFC implementation.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10230</id>
		<title>Programmer Guide/Shell Items/Dialog/SET DIALOG</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Dialog/SET_DIALOG&amp;diff=10230"/>
		<updated>2018-11-13T08:13:11Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Setting the attributes of a control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Dialog Item}}&lt;br /&gt;
Use the [[Programmer_Guide/Shell_Items/Dialog/NEW_DIALOG|&amp;lt;code&amp;gt;NEW DIALOG&amp;lt;/code&amp;gt;]] command for creating a [[Programmer_Guide/Shell_Items/Dialog|&amp;lt;code&amp;gt;DIALOG&amp;lt;/code&amp;gt; shell item]]. Then apply the &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; commands described here. &lt;br /&gt;
&lt;br /&gt;
== Data Exchange==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt; ] /Read|Write&lt;br /&gt;
&lt;br /&gt;
Exchange data between the dialog controls and their respective variables.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;ctrlId&amp;lt;/var&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The optional id of an existing control. If specified, the exchange only takes place for this control. Otherwise, all data for all controls is exchanged.&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | The direction of data exchange (as seen from the shell).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; || reads the data out of the control into the shell variable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; || sets the values of the controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you want to read or write only a subset of connected dialog controls, you may do so by using the command&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ]&lt;br /&gt;
See [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Setting_the_attributes_of_a_control|Setting the attributes of a control]] on this page.&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Control ==&lt;br /&gt;
&lt;br /&gt;
Set the display and/or dialog window mode, style position and/or size, and configure the dialog. If the option &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; (dialog &amp;amp;rarr; shell) or &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; (shell &amp;amp;rarr; dialog) is specified, a data exchange between the dialog controls and the variables and items bound to the controls is performed. The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; command has different functions for displays with only a dialog and for displays containing a dialog and graphs.&lt;br /&gt;
&lt;br /&gt;
=== Dialog only ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;] [/Centered /Foreground /Dialog /View /Layout|layout]&lt;br /&gt;
&lt;br /&gt;
The dialog is enabled (window is created) and the command is forwarded to the display.&lt;br /&gt;
&lt;br /&gt;
=== Dialog and graphs ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [/Read|Write]&lt;br /&gt;
&lt;br /&gt;
The dialog window mode is set. Other arguments/options are ignored if specified.&lt;br /&gt;
&lt;br /&gt;
=== Options ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The dialog window mode, one out of &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;NOWINDOW&amp;lt;/code&amp;gt; is used, the dialog window is destroyed and the dialog must be reconfigured (i.e. controls must be created etc).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;style&amp;lt;/var&amp;gt;&lt;br /&gt;
| The window style (&amp;lt;code&amp;gt;MINIMIZE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MAXIMIZE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;RESTORE&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;&lt;br /&gt;
|The x-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;&lt;br /&gt;
| The y-axis position in pixels of the upper left corner of the dialog relative to the desktop origin.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt;&lt;br /&gt;
| The height of the dialog in pixels.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Centered&amp;lt;/code&amp;gt;&lt;br /&gt;
| Center the display to the screen in which the mouse is currently. &amp;lt;var&amp;gt;xpos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;ypos&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;height&amp;lt;/var&amp;gt; are ignored.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Foreground&amp;lt;/code&amp;gt;&lt;br /&gt;
| Send the window to the front (make the window the topmost window).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Dialog=&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set dialog position inside the display (relative to graphs); changing the position is only possible if the dialog is non-floating. The following values for &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; are allowed: &amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/View=&amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Set window view mode to &amp;lt;var&amp;gt;view&amp;lt;/var&amp;gt; (&#039;&amp;lt;code&amp;gt;WINDOW&amp;lt;/code&amp;gt;&#039; is a normal window, or &#039;&amp;lt;code&amp;gt;FULLSCREEN&amp;lt;/code&amp;gt;&#039; = display takes up whole screen (for displays of type &#039;frame&#039; only) or &#039;&amp;lt;code&amp;gt;ALWAYSONTOP&amp;lt;/code&amp;gt;&#039; = the display remains on top, even when other windows are activated).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt;&lt;br /&gt;
| Recalculate the dialog window size, including (&amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; - note the upper-case &amp;amp;quot;L&amp;amp;quot;) or ignoring (&amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt; - note the lower-case &amp;amp;quot;l&amp;amp;quot;) hidden controls (this is one of our very few case-sensitive option letters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Window Configuration==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; TITLE &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the caption of the display owning the &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;. The caption can be an empty string. Note that it is advisable to surround the string &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; in quotes, since otherwise, only the first word of the string is interpreted as the title (the rest being additional arguments, which are ignored).&lt;br /&gt;
&lt;br /&gt;
Code example:&lt;br /&gt;
 SET $#dlg TITLE &#039;Der Wiener Schnitzel mit de Lavignetten und de Sauerkraut&#039;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;LAYOUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; LAYOUT &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the dialog margins and the default font. The default font will be used for all &#039;&#039;newly&#039;&#039; created controls (the existing ones will keep their respective font). The unit for specifying margins is characters, just like the control position and size. So, if you specify a margin of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;, it will be roughly as wide as a string of &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; characters would be (&amp;amp;quot;roughly&amp;amp;quot;, because with proportional fonts, the single characters are of different widths). Note that each control may be assigned an individual font, thereby overriding this default font (see &amp;lt;code&amp;gt;SET dialog index controltype&amp;lt;/code&amp;gt; below).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The default font (see Fonts and Font Arguments for details).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;left&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;right&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the left/right side (in characters).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;top&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;bottom&amp;lt;/var&amp;gt;&lt;br /&gt;
| The margin on the top/bottom (in characters).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Dialog Context Menus ==&lt;br /&gt;
&lt;br /&gt;
It is possible to attach a set of context menus to each dialog. The displaying of the context menu is controlled by the programmer (normally by processing the messages &amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMSTAT]]&amp;lt;/code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages| and ]]&amp;lt;code&amp;gt;[[Programmer Guide/Shell Items/Dialog/DISPLAY and DIALOG Messages|CMITEM]]&amp;lt;/code&amp;gt; in a message handler). Context menus are identified by an id string (specified in the &amp;lt;code&amp;gt;ADDPOPUP /X&amp;lt;/code&amp;gt; command) or a zero-based index (in the same order as the &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; commands). Note: If the option /X is not supplied in a command, the menu handling command is forwarded to the display and used for popup-menu handling. For a detailed description of menu item formats and menu item index computation see command &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Display/SET_DISPLAY#ADDPOPUP|SET display ADDPOPUP]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;amp;hellip; &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; ADDPOPUP /X &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;tableitem&amp;lt;/var&amp;gt; /Table&lt;br /&gt;
&lt;br /&gt;
Add a context menu to the dialog.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;id&amp;lt;/var&amp;gt;&lt;br /&gt;
| The id of the context menu in the dialog (a dialog can have more than one context menu). This is not shown in the menu itself.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;item&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&lt;br /&gt;
| The menu items.&lt;br /&gt;
|-&lt;br /&gt;
|  &amp;lt;var&amp;gt;tableItem&amp;lt;/var&amp;gt;&lt;br /&gt;
| A table&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;SETPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; SETPOPUP /X &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Enable|Disable ] [ /Check|Uncheck ]&lt;br /&gt;
&lt;br /&gt;
Activate or deactivate and/or set or clear the check state of menu items &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;index&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;. The items may be located in different menus.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;DELPOPUP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELPOPUP /X&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; DELETEPOPUP /X&lt;br /&gt;
&lt;br /&gt;
Delete all context menus. Note that you can replace an existing popup by just calling &amp;lt;code&amp;gt;ADDPOPUP&amp;lt;/code&amp;gt; again with the same index.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;CONTEXTMENU&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; CONTEXTMENU &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Show the contextmenu with index or id &amp;lt;var&amp;gt;menuId&amp;lt;/var&amp;gt;. This command is usually called in response to a &amp;lt;code&amp;gt;CMSTAT&amp;lt;/code&amp;gt; message.&lt;br /&gt;
&lt;br /&gt;
== Editing cells in a &amp;lt;code&amp;gt;LISTVIEW&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listviewIndex&amp;lt;/var&amp;gt; STARTEDIT &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sets the dialog focus to the specified cell and enters edit mode. If the user presses ESC, Return or Enter, the control leaves edit mode. &amp;lt;var&amp;gt;col&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;row&amp;lt;/var&amp;gt; are zero-based indices addressing the field and entry. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Setting the attributes of a control ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ] [/Layout|layout]&lt;br /&gt;
 &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt; ] [ /Read|Write ] [ /N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ] [/Layout|layout]&lt;br /&gt;
&lt;br /&gt;
Set mode and attributes of a control.&lt;br /&gt;
 &lt;br /&gt;
The option &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; may be used to apply settings to &#039;&#039;all&#039;&#039; controls in a range &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to &amp;lt;code&amp;gt;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;+count-1&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The options &amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; request data being transferred from the dialog to the connected shell variable (&amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt;), or from the connected shell variable to the dialog control (&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;) - for a description, see the [[Programmer_Guide/Shell_Items/Dialog/SET_DIALOG#Data_Exchange|Data Exchange]] section on this page. This data exchange will take place for the addressed control(s) only (as opposed to &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; which transfers data to/from &#039;&#039;all&#039;&#039; controls of the dialog).&lt;br /&gt;
&lt;br /&gt;
The options &amp;lt;code&amp;gt;/Layout&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt; can be used to recompute the position/size of all dialog controls and of the dialog window itself. With the option &amp;lt;code&amp;gt;/layout&amp;lt;/code&amp;gt; hidden controls are ignored.&lt;br /&gt;
&lt;br /&gt;
The color and font specifications are described in the appendix. Note that color settings are applied to controls of type &amp;lt;code&amp;gt;static&amp;lt;/code&amp;gt;, and to the caption of controls with a separate caption, window only.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The index of the (first) control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
| The number of controls (&amp;gt;= 1, default = 1).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control mode (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;HIDDEN&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VISIBLE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ENABLED&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;TITLE&amp;lt;/code&amp;gt; is defined for compatibility to earlier versions only. It has the same meaning as &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; (do not change mode, just set attributes).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control caption.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;font&amp;lt;/var&amp;gt;&lt;br /&gt;
| The control font. See Fonts and Font Arguments for details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;,&amp;amp;nbsp;&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;&lt;br /&gt;
|The foreground (&amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt;) and background (&amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;) color. You may use either a color keyword or an RGB value for each of &amp;lt;var&amp;gt;fg&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;bg&amp;lt;/var&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;FOCUS&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; FOCUS&lt;br /&gt;
&lt;br /&gt;
Give a particular control the input focus. All keyboard input is then directed to the control. This command can be used in setup or input dialogs to set the focus to the default input field after creating and displaying the dialog. If no index is specified or if its value is less than zero, the focus is set to the dialog window itself.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;INPUT&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;dialog&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; INPUT &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Connect dialog control with a data output.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;output&amp;lt;/var&amp;gt;&lt;br /&gt;
| an SPU output or a value object&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;BITMAP&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 SET dialog index BITMAP &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt; ][ /B ]&lt;br /&gt;
&lt;br /&gt;
Assign a bitmap to a button or a static control. The assigned bitmap is displayed in its original size and colors in the center of the control. If no bitmap is specified, any existing assignment is removed. Bitmaps can be read from bitmap files (*.BMP) or from the {{STX}} resource file. To identify a resource the name (or index) of a bitmap resource (no option) or a toolbar button (option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;) can be used.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &#039;button&#039; or &#039;static&#039; dialog control index.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt;&lt;br /&gt;
| The bitmap id or toolbar button id. See the &amp;quot;Bitmaps for Dialog Controls, Icons, Toolbar Buttons&amp;quot; topic in &amp;lt;GD&amp;gt; for a list of available b&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;bitmapFile&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a bitmap file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;var&amp;gt;tooltipText&amp;lt;/var&amp;gt;&lt;br /&gt;
| If specified, this string will be displayed as a tooltip when the mouse hovers over the button. This parameter overrides any string associated with the bitmap (/b) in the resource file.&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt;&lt;br /&gt;
| If the option &amp;lt;code&amp;gt;/B&amp;lt;/code&amp;gt; is specified, the &amp;lt;var&amp;gt;buttonId&amp;lt;/var&amp;gt; references a toolbar button (rather than a bitmap resource). [[Programmer_Guide/General_Descriptions/Bitmaps_for_Dialog_Controls,_Icons,_Toolbar_Buttons|Bitmaps for Dialog Controls, Icons, Toolbar Buttons]] shows all images available in {{STX}}.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET dialog index BITMAP&amp;lt;/code&amp;gt; command only works once a dialog has been created, i.e. after &amp;lt;code&amp;gt;domodaldialog begin&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Dialog Control Creation ==&lt;br /&gt;
&lt;br /&gt;
You can create a control in a dialog using the &amp;lt;code&amp;gt;SET dialog index controlType&amp;lt;/code&amp;gt; commands defined below. All dialog controls must be created before the dialog is displayed for the first time. You can show and hide dialog controls once the dialog has been created with the &amp;lt;code&amp;gt;SET dialog mode&amp;lt;/code&amp;gt; command. See [[Programmer_Guide/Shell_Items/Dialog/Dialog_Controls|Dialog Controls]] for a list of available controls and their individual creation syntax.&lt;br /&gt;
&lt;br /&gt;
The number of controls per dialog is limited to 255 due to the MFC implementation.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Table/SET_TABLE&amp;diff=10229</id>
		<title>Programmer Guide/Shell Items/Table/SET TABLE</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Table/SET_TABLE&amp;diff=10229"/>
		<updated>2018-11-13T07:28:21Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Copying to and from the clipboard */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Table_Item_Template}}&lt;br /&gt;
The &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&amp;amp;hellip;&amp;lt;/code&amp;gt; command is used to modify a table item. The sub-commands documented here are valid for all table types, unless otherwise specified.&lt;br /&gt;
&lt;br /&gt;
== Setting or Adding table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;amp;hellip; [ /Tag | /Untag ]&lt;br /&gt;
&lt;br /&gt;
When using the index of an &#039;&#039;existing&#039;&#039; entry for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, the command will modify the respective entry. When supplying the asterisk, &amp;amp;quot;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&amp;amp;quot;, for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, a &#039;&#039;new entry&#039;&#039; will be appended to the end of the table. Finally, when supplying a value for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; that is &#039;&#039;greater&#039;&#039; than the number of entries (&amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt;), the table will be padded with an appropriate number of empty entries in order to allow the entry &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to be set.&lt;br /&gt;
&lt;br /&gt;
The options &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt; may be used for setting or clearing the tag flag.&lt;br /&gt;
&lt;br /&gt;
Remember that with {{STX}} table indexes are always zero-based.&lt;br /&gt;
&lt;br /&gt;
=== Unstructured adding ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt; [ /Tag|Untag ]&lt;br /&gt;
&lt;br /&gt;
This statement is the sole way of adding entries to a simple table. The statement is applicable to extended tables, too. With extended tables, the field separator character may be used to separate fields in the string &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt;, meaning that &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt; will be parsed in the same way as entries are loaded from files.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The zero-based index of an existing entry to modify the entry&#039;s data or a zero-based index greater than the number of existing entries, to add a new entry. If the index is greater than the total number of entries, then all missing entries are created and initialized with default values. An asterisk may be used to append the table with a new entry at the next free index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt;&lt;br /&gt;
| The value to assign to the entry.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt;&lt;br /&gt;
| tag, or untag, the respective entry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Adding structured data to extended tables ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Tag|Untag ] [ /N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;|all|tagged ]&lt;br /&gt;
&lt;br /&gt;
The structured variant of setting entries allows to address the fields of an entry. It is thus applicable to extended tables only. Using the option &amp;lt;code&amp;gt;/N&amp;lt;/code&amp;gt;, you may even set multiple entries at the same time.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The zero-based index of an existing entry to modify the entry&#039;s data or a zero-based index greater than the number of existing entries, to add a new entry. If the index is greater than the total number of entries, then all missing entries are created and initialized with default values. An asterisk may be used to append the table with a new entry at the next free index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&amp;amp;hellip;&lt;br /&gt;
| A valid field id (as defined in the &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW TABLE]]&amp;lt;/code&amp;gt; command) or a field index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&amp;amp;hellip;&lt;br /&gt;
| The value to assign to the respective field.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt;&lt;br /&gt;
| tag, or untag, the respective entry&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Repeat this assignment for the next &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; entries (with &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; being an integer higher than, or equal to, 1), or for &#039;&#039;all&#039;&#039; entries from the current one to the last one (with &amp;lt;code&amp;gt;/N=all&amp;lt;/code&amp;gt;), or for all tagged entries from the current one to the last one (&amp;lt;code&amp;gt;/N=tagged&amp;lt;/code&amp;gt;). Note that the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tagged&amp;lt;/code&amp;gt; variants cannot append new entries to the table. Note also that you cannot set &#039;all&#039; entries, if only tagged entries are currently visible.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 // initialize the first field of the first 10 entries with the value 0.&lt;br /&gt;
 $#extTable 0 0 0 /N=10&lt;br /&gt;
&lt;br /&gt;
== Retrieving a table entry ==&lt;br /&gt;
&lt;br /&gt;
You can retrieve a table entry using the following syntax: &amp;lt;code&amp;gt;$#table[$#index]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring a table field==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET table CONFIG&amp;lt;/code&amp;gt; command is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]] (after all, [[Programmer_Guide/Concepts/Simple_table|simple tables]] do not have fields).&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CONFIG &amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mmode&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mval&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;header&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;align&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;sort&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt;&lt;br /&gt;
                          [ &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;setuserdefault&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;multirow&amp;lt;/var&amp;gt; ] ]&lt;br /&gt;
&lt;br /&gt;
Configure a table field. Define the display format (list box and list view) and field properties. The field must have been specified in the &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Table/NEW_TABLE|NEW TABLE]]&amp;lt;/code&amp;gt; command. The table must be in configuration mode (see &amp;lt;code&amp;gt;[[#Setting_the_table_mode|MODE]]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name or index of the field to be configured / updated.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt;&lt;br /&gt;
| Show (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or hide (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) the field in listbox and list view controls&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;&lt;br /&gt;
| Show both name and value (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or value only (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) in list box controls. This is only effective if &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt;&lt;br /&gt;
| The scaling factor for numeric fields; if a numeric field is accessed in the [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Show_Format|show format]], its value is multiplied with scale (used by both listboxes and listviews).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
| The [[Programmer Guide/Shell Items/Table/Show_Format|show format]] format string.&lt;br /&gt;
&lt;br /&gt;
For fields of type &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;, the format must contain a string tag (e.g.: &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%10.10s&amp;lt;/code&amp;gt;) For both numeric field types (&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;), the format must contain a float tag (&amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%g&amp;lt;/code&amp;gt;). The float tag is necessary for integer values because the scaling factor (&amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt;) is a floating number.&lt;br /&gt;
&lt;br /&gt;
Note that to display an integer (without decimals) you can use the format tag &amp;lt;code&amp;gt;%5.0f&amp;lt;/code&amp;gt;. This parameter controls the format for listboxes and listviews dialog controls.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mmode&amp;lt;/var&amp;gt;&lt;br /&gt;
| Enable (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or disable (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) missing value replacement. Missing value replacement is disabled by default. If enabled, missing values are replaced by &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mval&amp;lt;/var&amp;gt;&lt;br /&gt;
| The numeric id value of a &#039;missing value&#039; (e.g. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for f0 data). The default is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Missing value replacement only works for numerical fields (&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt;&lt;br /&gt;
| The replacement symbol (string) for missing values (e.g. &amp;lt;code&amp;gt;UNVOICED&amp;lt;/code&amp;gt; for f0 data). The strings &amp;lt;code&amp;gt;&amp;lt;empty&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;blank&amp;gt;&amp;lt;/code&amp;gt; can be used to replace a missing value with an empty string or a blank character. The default string is the empty string.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;header&amp;lt;/var&amp;gt;&lt;br /&gt;
| The text to be displayed in the field&#039;s column header of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width (in characters) of the column of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;align&amp;lt;/var&amp;gt;&lt;br /&gt;
| Align field left (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) or right (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;) in the column of a listview control; The first column of a listview is always. left-aligned (align is ignored)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;sort&amp;lt;/var&amp;gt;&lt;br /&gt;
| Enable (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;) or disable (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) the sort function of the column header of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt;&lt;br /&gt;
| If &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt; is set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, the respective field (column) of the table is NOT editable when the table is connected to a &amp;lt;code&amp;gt;ListView&amp;lt;/code&amp;gt; item. If &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt; is set to a number different from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, the respective field (column) of the table IS editable when the table is connected to a &amp;lt;code&amp;gt;ListView&amp;lt;/code&amp;gt; item. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a table containing all permissible values for this field. If this table (&amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;) is connected to a &amp;lt;code&amp;gt;listview&amp;lt;/code&amp;gt; item, and the &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; parameter is specified, the &amp;lt;code&amp;gt;listview&amp;lt;/code&amp;gt; displays a combobox in the associated column, and fills the combobox with &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt;&#039;s values.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt;&lt;br /&gt;
| The field id specifying the field in &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; where the values are stored. If &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; is a simple table, &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt; must be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt; parameter specifies whether this &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&#039;s field may only use values in the list table (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;), or whether any values may be entered (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the combobox is editable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt; parameter specifies whether invalid or empty data entered whilst editing should be replaced by the default value (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;=yes, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;=no). The first value in the list table is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;setuserdefault&amp;lt;/var&amp;gt;&lt;br /&gt;
| If set to &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, the last user-input for this field will be used as the respective default value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;multirow&amp;lt;/var&amp;gt;&lt;br /&gt;
| If set to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;, the field can display text in multiple rows. If set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;, text will be displayed in one row. The default is &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A field is defined once, but can be configured as often as needed. If an argument is not supplied or set to &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039;, the configuration for that parameter is not changed.See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a detailed example.&lt;br /&gt;
&lt;br /&gt;
== Table-to-table Copy ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; COPY &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt; &amp;amp;hellip; ] [ /Rows /Columns ]&lt;br /&gt;
&lt;br /&gt;
Copy data from the source table &amp;lt;var&amp;gt;srcTable&amp;lt;/var&amp;gt; (a parameter table or an extended table) to the target table &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; (a table of the same kind). If fields (&amp;lt;var&amp;gt;fieldids&amp;lt;/var&amp;gt;) are specified, then only these fields are copied. Otherwise all fields of the source table are copied.&lt;br /&gt;
&lt;br /&gt;
If the command is called &#039;&#039;without&#039;&#039; supplying options &amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;), then&lt;br /&gt;
# the source table must have the &#039;&#039;same format&#039;&#039;, i.e. the same fields, as the target table; and&lt;br /&gt;
# the source entries will &#039;&#039;overwrite&#039;&#039; the target entries (appending entries if necessary).&lt;br /&gt;
&lt;br /&gt;
If the command is called with either option &amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;, the command will &#039;&#039;not&#039;&#039; overwrite existing entries and fields in the target table. Rather than that, the command will &#039;&#039;modify&#039;&#039; the target table, appending source fields (which do not exist in the target table) and entries to the target table. Note that the target table must have enough undefined fields to accommodate the appended fields (i.e. fields created by &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Table/NEW_TABLE|NEW TABLE]]&amp;lt;/code&amp;gt;, but yet undefined).&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;COPY&amp;lt;/code&amp;gt; command works only with extended and with parameter tables.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt;:The table to copy from. This must be an extended or parameter table.&lt;br /&gt;
;&amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt;: An optional list of field IDs, separated by blank. If specified, only these fields are copied. If omitted, all fields are copied.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt;: If specified, fields from &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; are appended to &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;. The fields being copied must already be defined in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;. Note that the field data type is not checked (i.e. number fields can be copied to string fields of the same name).&lt;br /&gt;
;&amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;: If specified, entries from &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; are copied to the &#039;&#039;same&#039;&#039; entries in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;, &#039;&#039;overwriting their old value&#039;&#039;. Fields not defined in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; are automatically defined and configured. For this reason there must be enough undefined fields in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Copying between a Table and a Value Item ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; COPY &amp;lt;var&amp;gt;outputName&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt; [ /Row|Col ] [ /Write ]&lt;br /&gt;
&lt;br /&gt;
Copy data between a table and a [[Programmer_Guide/Shell_Items/Value|value object]]. If the option &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; is used, the table data is copied to the value item, otherwise (default) the value item data is copied to the table.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;outputName&amp;lt;/var&amp;gt;: The name of a value item to copy to or from.&lt;br /&gt;
;&amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt;: The entry index.&lt;br /&gt;
;&amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;: The field index.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Row&amp;lt;/code&amp;gt;: Copy table fields starting at row &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt; field &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;. The number of fields copied is determined by the size of the vector. The number of rows copied is determined by the number of vectors (only for array value items). This option is only for array and vector value items.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Col&amp;lt;/code&amp;gt;: Copy table entries starting at row &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt;, field &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;. The number of rows copied is determined by the size of the vector. The number of fields copied is determined by the number of vectors (array value items). This option is only for array and vector value items.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;: If the option &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; is specified, the table data is copied to the value item. If omitted, the value item data is copied to the table.&lt;br /&gt;
&lt;br /&gt;
== Copying to and from the clipboard ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD [ /Show|Write ]&lt;br /&gt;
&lt;br /&gt;
Copy the visible entries of a table to the clipboard. The entries can be copied either in:&lt;br /&gt;
# [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Show_Format|show-format]], i.e. using listbox display format, when supplying the &amp;lt;code&amp;gt;/Show&amp;lt;/code&amp;gt; option (or no option at all, since this is the default); or in&lt;br /&gt;
# [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Write_Format|write-format]], i.e. the format normally used when writing to a file. This is done with the &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; option.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;/Show&amp;lt;/code&amp;gt;: Use the show format to format each entry string. This is the default.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;: Use the write format to format each entry string.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD /Args arg1 arg2 ... [ /Show|Write ]&lt;br /&gt;
&lt;br /&gt;
Copy the content of the arguments to the clipboard. Each argument &amp;lt;code&amp;gt;argI&amp;lt;/code&amp;gt; can be a string (string is copied) or a table item (content of table is copied). The option &amp;lt;code&amp;gt;/Show|Write&amp;lt;/code&amp;gt; specifies the output format used for the table items (as described above). The content of the table item &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; is only copied, if it is specified as argument.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD /Read [ /Delete ] [ /Empty ]&lt;br /&gt;
&lt;br /&gt;
Read the last entry from the clipboard. This will work only if the format of the respective clipboard entry is either Unicode (&amp;lt;code&amp;gt;CF_UNICODETEXT&amp;lt;/code&amp;gt;) or text (&amp;lt;code&amp;gt;CF_TEXT&amp;lt;/code&amp;gt;).&lt;br /&gt;
;&amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt;: Mandatory option.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Delete&amp;lt;/code&amp;gt;: Delete the table entries before reading from the clipboard.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Empty&amp;lt;/code&amp;gt;: Empty the clipboard after a successful read.&lt;br /&gt;
&lt;br /&gt;
== Defining a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;* type name&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;count offset&amp;lt;/var&amp;gt;] [/Auto] [/Undefine]&lt;br /&gt;
&lt;br /&gt;
Note that the table must be in configuration mode (see [[XXX|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]]). Define the data type and name of field &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; (0 .. number of fields - 1). If an asterisk &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039; is given instead of &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, the first free (undefined) index is used. The argument &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is the id of the data type of the field. The argument &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is the name to be assigned to the field and must be a valid name string. The parameters &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; can be used to define multiple fields with one command (&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; = number of fields, &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; = base index). The option /Auto ensures the name is unique by concatenating the string name with an index (first value: 1). Note that once you have configured the table, you need to switch to DATA mode (see [[XXX|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]] below).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE&amp;lt;/code&amp;gt; command is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]], since only they support different types of fields.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;: The index of the field to be defined or &#039;*&#039; for the next free index.&lt;br /&gt;
;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;: The type of data to be stored. The following values are supported:&lt;br /&gt;
:&amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; - Strings which are valid names.&lt;br /&gt;
:&amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt; - Free text.&lt;br /&gt;
:&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; - Integer numbers.&lt;br /&gt;
:&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt; - Floating point numbers.&lt;br /&gt;
;&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;: The name to assign to the field. Note that this must also be a valid name.&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;: The number of fields to define. Used in conjunction with &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; for multiple definitions. Must be &amp;gt;= &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
;&amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt;: The index to start multiple definitions with. Must be &amp;gt;= &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Undefining a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; [&amp;amp;hellip; /Undefine]&lt;br /&gt;
&lt;br /&gt;
Undefine an existing field and delete contents of all field entries. Multiple undefines are possible by using the option &amp;lt;code&amp;gt;/Undefine&amp;lt;/code&amp;gt; in conjunction with multiple parameters.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;index|name&amp;lt;/var&amp;gt;: The index or name of the field(s) to undefine.&lt;br /&gt;
&lt;br /&gt;
== Renaming a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;fieldName&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;newName&amp;lt;/var&amp;gt; /Rename&lt;br /&gt;
&lt;br /&gt;
Rename an existing field.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fieldName&amp;lt;/var&amp;gt;: The existing field name.&lt;br /&gt;
;&amp;lt;var&amp;gt;newName&amp;lt;/var&amp;gt;: The new field name&lt;br /&gt;
;&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;&lt;br /&gt;
:The mandatory option &amp;lt;code&amp;gt;/Rename&amp;lt;/code&amp;gt;, specifying that this &amp;lt;code&amp;gt;DEFINE&amp;lt;/code&amp;gt; command should rename the field.&lt;br /&gt;
&lt;br /&gt;
An example can be found in the macro file &amp;lt;code&amp;gt;table_redefine.sts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Deleting table entries ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;] /Delete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Delete all visible entries or the specified entry &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== {{anchor|FIND|Finding table entries}} ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function implements a simple &#039;database query&#039; interface for tables. To create complex queries, it may be necessary to apply a set of &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt;s and possibly combine them with the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/FIND|FIND]]&amp;lt;/code&amp;gt; command. The &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function only searches tagged entries. Therefore, if you want to search the whole table, you must tag all the entries first. At the end of a query (any number of &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function calls), the tagged entries are those matching the search criteria.&lt;br /&gt;
&lt;br /&gt;
SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FIND&lt;br /&gt;
&lt;br /&gt;
Initialize a new find cycle. The tag flag of all entries are set and visibility is set to ALL. This command should be issued before a new query consisting of multiple commands is started. Instead of this command the option /Start can be used with the (first) &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FIND &amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;loper cexpr&amp;lt;/var&amp;gt; ...] [/Start /Invert /Tagged]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Search for all tagged entries matching the criteria defined by the &amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;loper&amp;lt;/var&amp;gt; arguments. The tag flags of all not matching entries are cleared. The logical operators are evaluated strictly from left to right. This means the result of all expressions of the left side of an operator is combined with the result of the expression on the right side. The logical operators &amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt; (=&amp;amp;&amp;amp;), &amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt; (=||) and &amp;lt;code&amp;gt;XOR&amp;lt;/code&amp;gt; (=^^) are defined. Note that the field value for simple tables is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The expression defining one search criterion (see Find expressions for details).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;loper&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The logical operator combining two search criteria; logical operators are applied from left to right, bracketing is not possible. The following operators are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt; - conjunction&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - conjunction&lt;br /&gt;
&amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt; - disjunction&lt;br /&gt;
&amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - disjunction&lt;br /&gt;
&amp;lt;code&amp;gt;XOR&amp;lt;/code&amp;gt; - exclusive disjunction&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;^^&amp;lt;/code&amp;gt; - exclusive disjunction&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Start&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Initialize a new find cycle (this is like a call to &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; without arguments and is applied before query).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Invert&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Invert all tag flags (applied after query).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Tagged&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Switch to visibility &amp;quot;tagged&amp;quot; (applied after query).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// search for entries where key field ends with &#039;ing&#039;&lt;br /&gt;
// and show only tagged entries&lt;br /&gt;
$#t find &#039;key:=I:*ing&#039; /Tagged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== {{Anchor|FINDEXPR|Find expressions}} ==&lt;br /&gt;
{{:Programmer_Guide/General_Descriptions/Find_Expressions}}&lt;br /&gt;
&lt;br /&gt;
== Regular expressions ==&lt;br /&gt;
&lt;br /&gt;
S_TOOLS&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;STx supports searches using POSIX regular expression. When using regular expressions, characters which have a special meaning in {{STX}} will need to be escaped using the {{STX}} escape character &amp;quot;&amp;lt;code&amp;gt;`&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|fieldid:cond:regex&lt;br /&gt;
|Match the value of a string field (type &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;).{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fieldid&lt;br /&gt;
|name or index of a string field (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for simple tables)&lt;br /&gt;
|-&lt;br /&gt;
|cond&lt;br /&gt;
|=RI&lt;br /&gt;
|matching regular expression ignoring case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|=RR&lt;br /&gt;
|matching regular expression respecting case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|!RI&lt;br /&gt;
|not matching regular expression even if ignoring case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|!RR&lt;br /&gt;
|not matching regular expression if respecting case.&lt;br /&gt;
|-&lt;br /&gt;
|regex&lt;br /&gt;
|a POSIX regular expression.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The script &amp;lt;code&amp;gt;regular_expressions.sts&amp;lt;/code&amp;gt; provides examples of usage.&lt;br /&gt;
&lt;br /&gt;
== Formatting table fields ==&lt;br /&gt;
&lt;br /&gt;
Formatting is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]].&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FORMAT &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;numfmt &amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;intfmt&amp;lt;/var&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Configuration of the write format used to save and load tables from files (see [[XXX|&amp;lt;code&amp;gt;SET file LOAD&amp;lt;/code&amp;gt;]] and [[XXX|&amp;lt;code&amp;gt;SET file SAVE&amp;lt;/code&amp;gt;]]). You can configure the [[Programmer Guide/Shell Items/Table/Show_Format|show format]] (used to display tables in the GUI) using the [[Programmer_Guide/Shell_Items/Table/SET_TABLE#Configuring_a_table_field|&amp;lt;code&amp;gt;CONFIG&amp;lt;/code&amp;gt;]] command.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - Store all fields even if they are empty. Assigned fields have the format &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt; and empty fields have just the &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;. E.g.: &amp;lt;code&amp;gt;10.0 ; 10.1 ; ; 10.3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;1 &amp;lt;/code&amp;gt; - Only assigned fields are stored. Every assigned field outputs the following string &amp;lt;code&amp;gt;fieldindex&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;. E.g.: &amp;lt;code&amp;gt;c0=10.0 ; c1=10.1 ; c2= ; c3=10.3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note: In order to load a table successfully, it must be loaded using the same format setting as was used to save it.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;&lt;br /&gt;
:delimiter string used to separate fields in the output line (for both formats). The special symbol &#039;%t&#039; can be used to specify the tab character. Consecutive white spaces (blanks and tabs) are interpreted as one delimiter. E.g. &amp;quot; 1 2 3&amp;quot; is interpreted as three fields, whereas &amp;quot;:1::2:3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt;&lt;br /&gt;
:delimiter string used to separate the &amp;lt;code&amp;gt;fieldindex&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; (for format &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; only)&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;numfmt&amp;lt;/var&amp;gt;&lt;br /&gt;
:Float format string used for all fields of type &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;. This can be any valid C string format specifier.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;intfmt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Integer (!) format string used for all fields of type &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;. This can be any valid C string format specifier.&lt;br /&gt;
&lt;br /&gt;
You can set the decimal symbol using the [[#Setting_the_table_mode|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]] command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
///////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//    Macro:          load_a_file_into_a_table.sts&lt;br /&gt;
//    Description:    load the contents of a numeric text file into a parameter&lt;br /&gt;
//                    table and displays the table if desired&lt;br /&gt;
//    Parameters:     #fileName    the file to load&lt;br /&gt;
//                    #mode        0    silent&lt;br /&gt;
//                                 1    show table&lt;br /&gt;
//                                 2    return table&lt;br /&gt;
//    Return:         0 on success, non-zero on failure&lt;br /&gt;
//    Usage:          load_a_file_into_a_table [file] ; [show]&lt;br /&gt;
//    Author:         Jonnie White&lt;br /&gt;
//    History:        2005-03-31    jw    created&lt;br /&gt;
//                    2005-04-27    jw    added new mode (return table) and file &lt;br /&gt;
//                                        parameter&lt;br /&gt;
//&lt;br /&gt;
///////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
[macro load_a_file_into_a_table]&lt;br /&gt;
    #fileName := set &#039;$scriptDirectory\input_matrix_small.txt&#039;&lt;br /&gt;
    #mode := 1&lt;br /&gt;
    readvar #argv #fileName&#039;;&#039;#mode&lt;br /&gt;
&lt;br /&gt;
    // create a parameter table with 4 fields&lt;br /&gt;
    #tableItem := new table * 4 /Parameter number:f:4&lt;br /&gt;
    if &#039;$#tableItem&#039; == * em -1 ; failed to create a table&lt;br /&gt;
    &lt;br /&gt;
    // set the write format to blank separated&lt;br /&gt;
    $#tableItem format 0 &#039; &#039;&lt;br /&gt;
    &lt;br /&gt;
    // create the read-only file object associated with fileName&lt;br /&gt;
    #fileItem := new file * &#039;$#fileName&#039; /Text /Read&lt;br /&gt;
    if &#039;$#fileItem&#039; == * em -1 ; failed to open the file $#fileName&lt;br /&gt;
    &lt;br /&gt;
    // load the file into the table&lt;br /&gt;
    $#fileItem load $#tableItem&lt;br /&gt;
    if &#039;$rc&#039; &amp;gt; 0 em -1 ; failed to load file $#fileName into table $#tableItem&lt;br /&gt;
    &lt;br /&gt;
    // show the table&lt;br /&gt;
    if &#039;$#mode&#039; == 1 showitem $#tableItem&lt;br /&gt;
    &lt;br /&gt;
    // return table&lt;br /&gt;
    if &#039;$#mode&#039; == 2 then&lt;br /&gt;
        delete $#fileItem&lt;br /&gt;
        exit 1 set &#039;$#tableItem&#039;&lt;br /&gt;
    else&lt;br /&gt;
        // clean up&lt;br /&gt;
        delete $#fileItem $#tableItem&lt;br /&gt;
    end&lt;br /&gt;
exit 1 int 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that if you need to save a table containing empty fields, you should *not* use a blank or a tab character as the delimiter. If you do, the empty fields will be omitted on loading the table.&lt;br /&gt;
&lt;br /&gt;
== Locking / Unlocking the table ==&lt;br /&gt;
&lt;br /&gt;
The use of &#039;&#039;&#039;lock/unlock&#039;&#039;&#039; is only important, if a table item is (or may be) used by more than one thread. In {{STX}} shells, spu items and display item are running in their own thread.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; LOCK [/Save]&lt;br /&gt;
Lock the table item. The execution of the calling shell is stopped, until the item can be locked. If locked, only the shell which locked it has access to the item until it is explicitly unlocked with the command &amp;lt;code&amp;gt;UNLOCK&amp;lt;/code&amp;gt;. Always beware of deadlocks.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; LOCK &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; [Save]&lt;br /&gt;
Try to lock the table item, but wait only the specified time. This command returns &#039;&#039;&#039;0&#039;&#039;&#039; (success) if the lock request was successful within the timeout, and a non-zero error code if not. If the caller already &#039;&#039;holds&#039;&#039; the lock, the command will fail immediately. This makes sense because, since the caller is the owner, it cannot release it whilst its waiting. The argument &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; specifies the maximum lock-timeout in milliseconds and must be a number greater than zero.&lt;br /&gt;
&lt;br /&gt;
:* If the table is locked with the option &#039;&#039;&#039;/Save&#039;&#039;&#039;, the tag state of each entry, the current order and the mode is saved on &amp;lt;code&amp;gt;lock&amp;lt;/code&amp;gt; and restored with the &amp;lt;code&amp;gt;unlock&amp;lt;/code&amp;gt; command. In this case in the critical section entries can only be modified, but not created or deleted. &lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; UNLOCK&lt;br /&gt;
Unlock the table item. &#039;&#039;&#039;Note&#039;&#039;&#039;: It&#039;s very important that for each successful &amp;lt;code&amp;gt;LOCK&amp;lt;/code&amp;gt;, an &amp;lt;code&amp;gt;UNLOCK&amp;lt;/code&amp;gt; is called!&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;lock_example.sts&amp;lt;/code&amp;gt; in the script examples directory for an example.&lt;br /&gt;
&lt;br /&gt;
== Setting the table mode ==&lt;br /&gt;
&lt;br /&gt;
This command is only applicable for [[Programmer_Guide/Concepts/Extended_table|extended tables]].&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; MODE &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;access format decimal&amp;lt;/var&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Set table mode (configuration / data) and general attributes.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A flag to switch the table mode to configuration mode (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) or data mode (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;); After creating an extended table the table may be in configuration or data mode, depending on the &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; command. See &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW table]]&amp;lt;/code&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;access&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This argument is currently meaningless. It is reserved for future database functions and should be set to &#039;&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&#039; or &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Selects the format to be used for file I/O: &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;amp;hellip;[[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Show_Format|show format]], &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&amp;amp;hellip;[[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Write_Format|write (default) format]].&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;decimal&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the character to be used as the decimal symbol. By default, the period &#039;&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;&#039; is used.&lt;br /&gt;
&lt;br /&gt;
Since {{STX}} 3.7.0, the &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW TABLE]]&amp;lt;/code&amp;gt; syntax has been modified to include the field definitions. The table mode is then automatically set to data, and hence this command may in future be pretty much obsolete, except for setting the decimal symbol.&lt;br /&gt;
&lt;br /&gt;
== Showing and hiding table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; /All|Tagged&lt;br /&gt;
&lt;br /&gt;
Make either all table entries visible (&amp;lt;code&amp;gt;/All&amp;lt;/code&amp;gt;) or only tagged entries (&amp;lt;code&amp;gt;/Tagged&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Only visible entries can be accessed, deleted or displayed (e.g. in a list box).&lt;br /&gt;
&lt;br /&gt;
== Sorting table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT [/Respect]&lt;br /&gt;
&lt;br /&gt;
Invert entry order (all tables) &amp;lt;!-- wie bitte!? --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For simple tables:&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT &amp;lt;var&amp;gt;dir&amp;lt;/var&amp;gt; [/Respect]&lt;br /&gt;
&lt;br /&gt;
For extended tables:&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT &amp;lt;var&amp;gt;fieldid dir&amp;lt;/var&amp;gt; [&amp;amp;hellip;] [/Respect]&lt;br /&gt;
&lt;br /&gt;
Sort table entries. For simple tables only the sort direction (&amp;lt;var&amp;gt;dir&amp;lt;/var&amp;gt;: Ascending (0), Descending (1)) can be selected.&lt;br /&gt;
&lt;br /&gt;
For extended tables, one or more fields and the sort direction can be specified. The sort function ignores the visibility setting and sorts all table entries. If the option &amp;lt;code&amp;gt;/Respect&amp;lt;/code&amp;gt; is used, strings are sorted respecting their case, otherwise the sort is case-insensitive.&lt;br /&gt;
&lt;br /&gt;
== Tagging table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; /Reset|Invert&lt;br /&gt;
&lt;br /&gt;
Reset (/Reset) or invert (/Invert) tag flags of all entries and set visibility to ALL.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table index&amp;lt;/var&amp;gt; /Tag|Untag|Invert&lt;br /&gt;
&lt;br /&gt;
Set, clear or invert tag flag of an entry. These options can also be used in all table commands assigning a value.&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;TAGS&amp;lt;/code&amp;gt; can be used to save and restore a table&#039;s tagged entries.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Table/SET_TABLE&amp;diff=10228</id>
		<title>Programmer Guide/Shell Items/Table/SET TABLE</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Table/SET_TABLE&amp;diff=10228"/>
		<updated>2018-11-13T07:26:41Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Copying to and from the clipboard */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Table_Item_Template}}&lt;br /&gt;
The &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&amp;amp;hellip;&amp;lt;/code&amp;gt; command is used to modify a table item. The sub-commands documented here are valid for all table types, unless otherwise specified.&lt;br /&gt;
&lt;br /&gt;
== Setting or Adding table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;amp;hellip; [ /Tag | /Untag ]&lt;br /&gt;
&lt;br /&gt;
When using the index of an &#039;&#039;existing&#039;&#039; entry for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, the command will modify the respective entry. When supplying the asterisk, &amp;amp;quot;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&amp;amp;quot;, for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, a &#039;&#039;new entry&#039;&#039; will be appended to the end of the table. Finally, when supplying a value for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; that is &#039;&#039;greater&#039;&#039; than the number of entries (&amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt;), the table will be padded with an appropriate number of empty entries in order to allow the entry &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to be set.&lt;br /&gt;
&lt;br /&gt;
The options &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt; may be used for setting or clearing the tag flag.&lt;br /&gt;
&lt;br /&gt;
Remember that with {{STX}} table indexes are always zero-based.&lt;br /&gt;
&lt;br /&gt;
=== Unstructured adding ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt; [ /Tag|Untag ]&lt;br /&gt;
&lt;br /&gt;
This statement is the sole way of adding entries to a simple table. The statement is applicable to extended tables, too. With extended tables, the field separator character may be used to separate fields in the string &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt;, meaning that &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt; will be parsed in the same way as entries are loaded from files.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The zero-based index of an existing entry to modify the entry&#039;s data or a zero-based index greater than the number of existing entries, to add a new entry. If the index is greater than the total number of entries, then all missing entries are created and initialized with default values. An asterisk may be used to append the table with a new entry at the next free index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt;&lt;br /&gt;
| The value to assign to the entry.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt;&lt;br /&gt;
| tag, or untag, the respective entry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Adding structured data to extended tables ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Tag|Untag ] [ /N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;|all|tagged ]&lt;br /&gt;
&lt;br /&gt;
The structured variant of setting entries allows to address the fields of an entry. It is thus applicable to extended tables only. Using the option &amp;lt;code&amp;gt;/N&amp;lt;/code&amp;gt;, you may even set multiple entries at the same time.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The zero-based index of an existing entry to modify the entry&#039;s data or a zero-based index greater than the number of existing entries, to add a new entry. If the index is greater than the total number of entries, then all missing entries are created and initialized with default values. An asterisk may be used to append the table with a new entry at the next free index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&amp;amp;hellip;&lt;br /&gt;
| A valid field id (as defined in the &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW TABLE]]&amp;lt;/code&amp;gt; command) or a field index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&amp;amp;hellip;&lt;br /&gt;
| The value to assign to the respective field.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt;&lt;br /&gt;
| tag, or untag, the respective entry&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Repeat this assignment for the next &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; entries (with &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; being an integer higher than, or equal to, 1), or for &#039;&#039;all&#039;&#039; entries from the current one to the last one (with &amp;lt;code&amp;gt;/N=all&amp;lt;/code&amp;gt;), or for all tagged entries from the current one to the last one (&amp;lt;code&amp;gt;/N=tagged&amp;lt;/code&amp;gt;). Note that the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tagged&amp;lt;/code&amp;gt; variants cannot append new entries to the table. Note also that you cannot set &#039;all&#039; entries, if only tagged entries are currently visible.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 // initialize the first field of the first 10 entries with the value 0.&lt;br /&gt;
 $#extTable 0 0 0 /N=10&lt;br /&gt;
&lt;br /&gt;
== Retrieving a table entry ==&lt;br /&gt;
&lt;br /&gt;
You can retrieve a table entry using the following syntax: &amp;lt;code&amp;gt;$#table[$#index]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring a table field==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET table CONFIG&amp;lt;/code&amp;gt; command is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]] (after all, [[Programmer_Guide/Concepts/Simple_table|simple tables]] do not have fields).&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CONFIG &amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mmode&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mval&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;header&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;align&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;sort&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt;&lt;br /&gt;
                          [ &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;setuserdefault&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;multirow&amp;lt;/var&amp;gt; ] ]&lt;br /&gt;
&lt;br /&gt;
Configure a table field. Define the display format (list box and list view) and field properties. The field must have been specified in the &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Table/NEW_TABLE|NEW TABLE]]&amp;lt;/code&amp;gt; command. The table must be in configuration mode (see &amp;lt;code&amp;gt;[[#Setting_the_table_mode|MODE]]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name or index of the field to be configured / updated.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt;&lt;br /&gt;
| Show (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or hide (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) the field in listbox and list view controls&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;&lt;br /&gt;
| Show both name and value (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or value only (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) in list box controls. This is only effective if &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt;&lt;br /&gt;
| The scaling factor for numeric fields; if a numeric field is accessed in the [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Show_Format|show format]], its value is multiplied with scale (used by both listboxes and listviews).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
| The [[Programmer Guide/Shell Items/Table/Show_Format|show format]] format string.&lt;br /&gt;
&lt;br /&gt;
For fields of type &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;, the format must contain a string tag (e.g.: &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%10.10s&amp;lt;/code&amp;gt;) For both numeric field types (&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;), the format must contain a float tag (&amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%g&amp;lt;/code&amp;gt;). The float tag is necessary for integer values because the scaling factor (&amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt;) is a floating number.&lt;br /&gt;
&lt;br /&gt;
Note that to display an integer (without decimals) you can use the format tag &amp;lt;code&amp;gt;%5.0f&amp;lt;/code&amp;gt;. This parameter controls the format for listboxes and listviews dialog controls.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mmode&amp;lt;/var&amp;gt;&lt;br /&gt;
| Enable (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or disable (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) missing value replacement. Missing value replacement is disabled by default. If enabled, missing values are replaced by &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mval&amp;lt;/var&amp;gt;&lt;br /&gt;
| The numeric id value of a &#039;missing value&#039; (e.g. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for f0 data). The default is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Missing value replacement only works for numerical fields (&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt;&lt;br /&gt;
| The replacement symbol (string) for missing values (e.g. &amp;lt;code&amp;gt;UNVOICED&amp;lt;/code&amp;gt; for f0 data). The strings &amp;lt;code&amp;gt;&amp;lt;empty&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;blank&amp;gt;&amp;lt;/code&amp;gt; can be used to replace a missing value with an empty string or a blank character. The default string is the empty string.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;header&amp;lt;/var&amp;gt;&lt;br /&gt;
| The text to be displayed in the field&#039;s column header of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width (in characters) of the column of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;align&amp;lt;/var&amp;gt;&lt;br /&gt;
| Align field left (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) or right (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;) in the column of a listview control; The first column of a listview is always. left-aligned (align is ignored)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;sort&amp;lt;/var&amp;gt;&lt;br /&gt;
| Enable (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;) or disable (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) the sort function of the column header of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt;&lt;br /&gt;
| If &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt; is set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, the respective field (column) of the table is NOT editable when the table is connected to a &amp;lt;code&amp;gt;ListView&amp;lt;/code&amp;gt; item. If &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt; is set to a number different from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, the respective field (column) of the table IS editable when the table is connected to a &amp;lt;code&amp;gt;ListView&amp;lt;/code&amp;gt; item. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a table containing all permissible values for this field. If this table (&amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;) is connected to a &amp;lt;code&amp;gt;listview&amp;lt;/code&amp;gt; item, and the &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; parameter is specified, the &amp;lt;code&amp;gt;listview&amp;lt;/code&amp;gt; displays a combobox in the associated column, and fills the combobox with &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt;&#039;s values.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt;&lt;br /&gt;
| The field id specifying the field in &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; where the values are stored. If &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; is a simple table, &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt; must be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt; parameter specifies whether this &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&#039;s field may only use values in the list table (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;), or whether any values may be entered (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the combobox is editable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt; parameter specifies whether invalid or empty data entered whilst editing should be replaced by the default value (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;=yes, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;=no). The first value in the list table is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;setuserdefault&amp;lt;/var&amp;gt;&lt;br /&gt;
| If set to &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, the last user-input for this field will be used as the respective default value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;multirow&amp;lt;/var&amp;gt;&lt;br /&gt;
| If set to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;, the field can display text in multiple rows. If set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;, text will be displayed in one row. The default is &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A field is defined once, but can be configured as often as needed. If an argument is not supplied or set to &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039;, the configuration for that parameter is not changed.See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a detailed example.&lt;br /&gt;
&lt;br /&gt;
== Table-to-table Copy ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; COPY &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt; &amp;amp;hellip; ] [ /Rows /Columns ]&lt;br /&gt;
&lt;br /&gt;
Copy data from the source table &amp;lt;var&amp;gt;srcTable&amp;lt;/var&amp;gt; (a parameter table or an extended table) to the target table &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; (a table of the same kind). If fields (&amp;lt;var&amp;gt;fieldids&amp;lt;/var&amp;gt;) are specified, then only these fields are copied. Otherwise all fields of the source table are copied.&lt;br /&gt;
&lt;br /&gt;
If the command is called &#039;&#039;without&#039;&#039; supplying options &amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;), then&lt;br /&gt;
# the source table must have the &#039;&#039;same format&#039;&#039;, i.e. the same fields, as the target table; and&lt;br /&gt;
# the source entries will &#039;&#039;overwrite&#039;&#039; the target entries (appending entries if necessary).&lt;br /&gt;
&lt;br /&gt;
If the command is called with either option &amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;, the command will &#039;&#039;not&#039;&#039; overwrite existing entries and fields in the target table. Rather than that, the command will &#039;&#039;modify&#039;&#039; the target table, appending source fields (which do not exist in the target table) and entries to the target table. Note that the target table must have enough undefined fields to accommodate the appended fields (i.e. fields created by &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Table/NEW_TABLE|NEW TABLE]]&amp;lt;/code&amp;gt;, but yet undefined).&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;COPY&amp;lt;/code&amp;gt; command works only with extended and with parameter tables.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt;:The table to copy from. This must be an extended or parameter table.&lt;br /&gt;
;&amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt;: An optional list of field IDs, separated by blank. If specified, only these fields are copied. If omitted, all fields are copied.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt;: If specified, fields from &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; are appended to &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;. The fields being copied must already be defined in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;. Note that the field data type is not checked (i.e. number fields can be copied to string fields of the same name).&lt;br /&gt;
;&amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;: If specified, entries from &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; are copied to the &#039;&#039;same&#039;&#039; entries in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;, &#039;&#039;overwriting their old value&#039;&#039;. Fields not defined in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; are automatically defined and configured. For this reason there must be enough undefined fields in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Copying between a Table and a Value Item ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; COPY &amp;lt;var&amp;gt;outputName&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt; [ /Row|Col ] [ /Write ]&lt;br /&gt;
&lt;br /&gt;
Copy data between a table and a [[Programmer_Guide/Shell_Items/Value|value object]]. If the option &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; is used, the table data is copied to the value item, otherwise (default) the value item data is copied to the table.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;outputName&amp;lt;/var&amp;gt;: The name of a value item to copy to or from.&lt;br /&gt;
;&amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt;: The entry index.&lt;br /&gt;
;&amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;: The field index.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Row&amp;lt;/code&amp;gt;: Copy table fields starting at row &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt; field &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;. The number of fields copied is determined by the size of the vector. The number of rows copied is determined by the number of vectors (only for array value items). This option is only for array and vector value items.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Col&amp;lt;/code&amp;gt;: Copy table entries starting at row &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt;, field &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;. The number of rows copied is determined by the size of the vector. The number of fields copied is determined by the number of vectors (array value items). This option is only for array and vector value items.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;: If the option &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; is specified, the table data is copied to the value item. If omitted, the value item data is copied to the table.&lt;br /&gt;
&lt;br /&gt;
== Copying to and from the clipboard ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD [ /Show|Write ]&lt;br /&gt;
&lt;br /&gt;
Copy the visible entries of a table to the clipboard. The entries can be copied either in:&lt;br /&gt;
# [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Show_Format|show-format]], i.e. using listbox display format, when supplying the &amp;lt;code&amp;gt;/Show&amp;lt;/code&amp;gt; option (or no option at all, since this is the default); or in&lt;br /&gt;
# [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Write_Format|write-format]], i.e. the format normally used when writing to a file. This is done with the &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; option.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;/Show&amp;lt;/code&amp;gt;: Use the show format to format each entry string. This is the default.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;: Use the write format to format each entry string.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD /Args arg1 arg2 ... [ /Show|Write ]&lt;br /&gt;
&lt;br /&gt;
Copy the content of the arguments to the clipboard. Each argument &amp;lt;code&amp;gt;argI&amp;lt;/code&amp;gt; can be a string (string is copied) or a table item (content of table is copied). The option &amp;lt;code&amp;gt;/Show|Write&amp;lt;/code&amp;gt; specifies the output format used for the table items (as described above).&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD /Read [ /Delete ] [ /Empty ]&lt;br /&gt;
&lt;br /&gt;
Read the last entry from the clipboard. This will work only if the format of the respective clipboard entry is either Unicode (&amp;lt;code&amp;gt;CF_UNICODETEXT&amp;lt;/code&amp;gt;) or text (&amp;lt;code&amp;gt;CF_TEXT&amp;lt;/code&amp;gt;).&lt;br /&gt;
;&amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt;: Mandatory option.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Delete&amp;lt;/code&amp;gt;: Delete the table entries before reading from the clipboard.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Empty&amp;lt;/code&amp;gt;: Empty the clipboard after a successful read.&lt;br /&gt;
&lt;br /&gt;
== Defining a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;* type name&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;count offset&amp;lt;/var&amp;gt;] [/Auto] [/Undefine]&lt;br /&gt;
&lt;br /&gt;
Note that the table must be in configuration mode (see [[XXX|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]]). Define the data type and name of field &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; (0 .. number of fields - 1). If an asterisk &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039; is given instead of &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, the first free (undefined) index is used. The argument &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is the id of the data type of the field. The argument &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is the name to be assigned to the field and must be a valid name string. The parameters &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; can be used to define multiple fields with one command (&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; = number of fields, &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; = base index). The option /Auto ensures the name is unique by concatenating the string name with an index (first value: 1). Note that once you have configured the table, you need to switch to DATA mode (see [[XXX|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]] below).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE&amp;lt;/code&amp;gt; command is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]], since only they support different types of fields.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;: The index of the field to be defined or &#039;*&#039; for the next free index.&lt;br /&gt;
;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;: The type of data to be stored. The following values are supported:&lt;br /&gt;
:&amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; - Strings which are valid names.&lt;br /&gt;
:&amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt; - Free text.&lt;br /&gt;
:&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; - Integer numbers.&lt;br /&gt;
:&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt; - Floating point numbers.&lt;br /&gt;
;&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;: The name to assign to the field. Note that this must also be a valid name.&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;: The number of fields to define. Used in conjunction with &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; for multiple definitions. Must be &amp;gt;= &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
;&amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt;: The index to start multiple definitions with. Must be &amp;gt;= &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Undefining a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; [&amp;amp;hellip; /Undefine]&lt;br /&gt;
&lt;br /&gt;
Undefine an existing field and delete contents of all field entries. Multiple undefines are possible by using the option &amp;lt;code&amp;gt;/Undefine&amp;lt;/code&amp;gt; in conjunction with multiple parameters.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;index|name&amp;lt;/var&amp;gt;: The index or name of the field(s) to undefine.&lt;br /&gt;
&lt;br /&gt;
== Renaming a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;fieldName&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;newName&amp;lt;/var&amp;gt; /Rename&lt;br /&gt;
&lt;br /&gt;
Rename an existing field.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fieldName&amp;lt;/var&amp;gt;: The existing field name.&lt;br /&gt;
;&amp;lt;var&amp;gt;newName&amp;lt;/var&amp;gt;: The new field name&lt;br /&gt;
;&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;&lt;br /&gt;
:The mandatory option &amp;lt;code&amp;gt;/Rename&amp;lt;/code&amp;gt;, specifying that this &amp;lt;code&amp;gt;DEFINE&amp;lt;/code&amp;gt; command should rename the field.&lt;br /&gt;
&lt;br /&gt;
An example can be found in the macro file &amp;lt;code&amp;gt;table_redefine.sts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Deleting table entries ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;] /Delete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Delete all visible entries or the specified entry &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== {{anchor|FIND|Finding table entries}} ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function implements a simple &#039;database query&#039; interface for tables. To create complex queries, it may be necessary to apply a set of &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt;s and possibly combine them with the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/FIND|FIND]]&amp;lt;/code&amp;gt; command. The &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function only searches tagged entries. Therefore, if you want to search the whole table, you must tag all the entries first. At the end of a query (any number of &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function calls), the tagged entries are those matching the search criteria.&lt;br /&gt;
&lt;br /&gt;
SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FIND&lt;br /&gt;
&lt;br /&gt;
Initialize a new find cycle. The tag flag of all entries are set and visibility is set to ALL. This command should be issued before a new query consisting of multiple commands is started. Instead of this command the option /Start can be used with the (first) &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FIND &amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;loper cexpr&amp;lt;/var&amp;gt; ...] [/Start /Invert /Tagged]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Search for all tagged entries matching the criteria defined by the &amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;loper&amp;lt;/var&amp;gt; arguments. The tag flags of all not matching entries are cleared. The logical operators are evaluated strictly from left to right. This means the result of all expressions of the left side of an operator is combined with the result of the expression on the right side. The logical operators &amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt; (=&amp;amp;&amp;amp;), &amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt; (=||) and &amp;lt;code&amp;gt;XOR&amp;lt;/code&amp;gt; (=^^) are defined. Note that the field value for simple tables is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The expression defining one search criterion (see Find expressions for details).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;loper&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The logical operator combining two search criteria; logical operators are applied from left to right, bracketing is not possible. The following operators are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt; - conjunction&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - conjunction&lt;br /&gt;
&amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt; - disjunction&lt;br /&gt;
&amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - disjunction&lt;br /&gt;
&amp;lt;code&amp;gt;XOR&amp;lt;/code&amp;gt; - exclusive disjunction&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;^^&amp;lt;/code&amp;gt; - exclusive disjunction&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Start&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Initialize a new find cycle (this is like a call to &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; without arguments and is applied before query).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Invert&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Invert all tag flags (applied after query).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Tagged&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Switch to visibility &amp;quot;tagged&amp;quot; (applied after query).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// search for entries where key field ends with &#039;ing&#039;&lt;br /&gt;
// and show only tagged entries&lt;br /&gt;
$#t find &#039;key:=I:*ing&#039; /Tagged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== {{Anchor|FINDEXPR|Find expressions}} ==&lt;br /&gt;
{{:Programmer_Guide/General_Descriptions/Find_Expressions}}&lt;br /&gt;
&lt;br /&gt;
== Regular expressions ==&lt;br /&gt;
&lt;br /&gt;
S_TOOLS&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;STx supports searches using POSIX regular expression. When using regular expressions, characters which have a special meaning in {{STX}} will need to be escaped using the {{STX}} escape character &amp;quot;&amp;lt;code&amp;gt;`&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|fieldid:cond:regex&lt;br /&gt;
|Match the value of a string field (type &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;).{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fieldid&lt;br /&gt;
|name or index of a string field (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for simple tables)&lt;br /&gt;
|-&lt;br /&gt;
|cond&lt;br /&gt;
|=RI&lt;br /&gt;
|matching regular expression ignoring case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|=RR&lt;br /&gt;
|matching regular expression respecting case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|!RI&lt;br /&gt;
|not matching regular expression even if ignoring case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|!RR&lt;br /&gt;
|not matching regular expression if respecting case.&lt;br /&gt;
|-&lt;br /&gt;
|regex&lt;br /&gt;
|a POSIX regular expression.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The script &amp;lt;code&amp;gt;regular_expressions.sts&amp;lt;/code&amp;gt; provides examples of usage.&lt;br /&gt;
&lt;br /&gt;
== Formatting table fields ==&lt;br /&gt;
&lt;br /&gt;
Formatting is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]].&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FORMAT &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;numfmt &amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;intfmt&amp;lt;/var&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Configuration of the write format used to save and load tables from files (see [[XXX|&amp;lt;code&amp;gt;SET file LOAD&amp;lt;/code&amp;gt;]] and [[XXX|&amp;lt;code&amp;gt;SET file SAVE&amp;lt;/code&amp;gt;]]). You can configure the [[Programmer Guide/Shell Items/Table/Show_Format|show format]] (used to display tables in the GUI) using the [[Programmer_Guide/Shell_Items/Table/SET_TABLE#Configuring_a_table_field|&amp;lt;code&amp;gt;CONFIG&amp;lt;/code&amp;gt;]] command.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - Store all fields even if they are empty. Assigned fields have the format &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt; and empty fields have just the &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;. E.g.: &amp;lt;code&amp;gt;10.0 ; 10.1 ; ; 10.3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;1 &amp;lt;/code&amp;gt; - Only assigned fields are stored. Every assigned field outputs the following string &amp;lt;code&amp;gt;fieldindex&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;. E.g.: &amp;lt;code&amp;gt;c0=10.0 ; c1=10.1 ; c2= ; c3=10.3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note: In order to load a table successfully, it must be loaded using the same format setting as was used to save it.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;&lt;br /&gt;
:delimiter string used to separate fields in the output line (for both formats). The special symbol &#039;%t&#039; can be used to specify the tab character. Consecutive white spaces (blanks and tabs) are interpreted as one delimiter. E.g. &amp;quot; 1 2 3&amp;quot; is interpreted as three fields, whereas &amp;quot;:1::2:3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt;&lt;br /&gt;
:delimiter string used to separate the &amp;lt;code&amp;gt;fieldindex&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; (for format &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; only)&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;numfmt&amp;lt;/var&amp;gt;&lt;br /&gt;
:Float format string used for all fields of type &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;. This can be any valid C string format specifier.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;intfmt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Integer (!) format string used for all fields of type &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;. This can be any valid C string format specifier.&lt;br /&gt;
&lt;br /&gt;
You can set the decimal symbol using the [[#Setting_the_table_mode|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]] command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
///////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//    Macro:          load_a_file_into_a_table.sts&lt;br /&gt;
//    Description:    load the contents of a numeric text file into a parameter&lt;br /&gt;
//                    table and displays the table if desired&lt;br /&gt;
//    Parameters:     #fileName    the file to load&lt;br /&gt;
//                    #mode        0    silent&lt;br /&gt;
//                                 1    show table&lt;br /&gt;
//                                 2    return table&lt;br /&gt;
//    Return:         0 on success, non-zero on failure&lt;br /&gt;
//    Usage:          load_a_file_into_a_table [file] ; [show]&lt;br /&gt;
//    Author:         Jonnie White&lt;br /&gt;
//    History:        2005-03-31    jw    created&lt;br /&gt;
//                    2005-04-27    jw    added new mode (return table) and file &lt;br /&gt;
//                                        parameter&lt;br /&gt;
//&lt;br /&gt;
///////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
[macro load_a_file_into_a_table]&lt;br /&gt;
    #fileName := set &#039;$scriptDirectory\input_matrix_small.txt&#039;&lt;br /&gt;
    #mode := 1&lt;br /&gt;
    readvar #argv #fileName&#039;;&#039;#mode&lt;br /&gt;
&lt;br /&gt;
    // create a parameter table with 4 fields&lt;br /&gt;
    #tableItem := new table * 4 /Parameter number:f:4&lt;br /&gt;
    if &#039;$#tableItem&#039; == * em -1 ; failed to create a table&lt;br /&gt;
    &lt;br /&gt;
    // set the write format to blank separated&lt;br /&gt;
    $#tableItem format 0 &#039; &#039;&lt;br /&gt;
    &lt;br /&gt;
    // create the read-only file object associated with fileName&lt;br /&gt;
    #fileItem := new file * &#039;$#fileName&#039; /Text /Read&lt;br /&gt;
    if &#039;$#fileItem&#039; == * em -1 ; failed to open the file $#fileName&lt;br /&gt;
    &lt;br /&gt;
    // load the file into the table&lt;br /&gt;
    $#fileItem load $#tableItem&lt;br /&gt;
    if &#039;$rc&#039; &amp;gt; 0 em -1 ; failed to load file $#fileName into table $#tableItem&lt;br /&gt;
    &lt;br /&gt;
    // show the table&lt;br /&gt;
    if &#039;$#mode&#039; == 1 showitem $#tableItem&lt;br /&gt;
    &lt;br /&gt;
    // return table&lt;br /&gt;
    if &#039;$#mode&#039; == 2 then&lt;br /&gt;
        delete $#fileItem&lt;br /&gt;
        exit 1 set &#039;$#tableItem&#039;&lt;br /&gt;
    else&lt;br /&gt;
        // clean up&lt;br /&gt;
        delete $#fileItem $#tableItem&lt;br /&gt;
    end&lt;br /&gt;
exit 1 int 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that if you need to save a table containing empty fields, you should *not* use a blank or a tab character as the delimiter. If you do, the empty fields will be omitted on loading the table.&lt;br /&gt;
&lt;br /&gt;
== Locking / Unlocking the table ==&lt;br /&gt;
&lt;br /&gt;
The use of &#039;&#039;&#039;lock/unlock&#039;&#039;&#039; is only important, if a table item is (or may be) used by more than one thread. In {{STX}} shells, spu items and display item are running in their own thread.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; LOCK [/Save]&lt;br /&gt;
Lock the table item. The execution of the calling shell is stopped, until the item can be locked. If locked, only the shell which locked it has access to the item until it is explicitly unlocked with the command &amp;lt;code&amp;gt;UNLOCK&amp;lt;/code&amp;gt;. Always beware of deadlocks.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; LOCK &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; [Save]&lt;br /&gt;
Try to lock the table item, but wait only the specified time. This command returns &#039;&#039;&#039;0&#039;&#039;&#039; (success) if the lock request was successful within the timeout, and a non-zero error code if not. If the caller already &#039;&#039;holds&#039;&#039; the lock, the command will fail immediately. This makes sense because, since the caller is the owner, it cannot release it whilst its waiting. The argument &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; specifies the maximum lock-timeout in milliseconds and must be a number greater than zero.&lt;br /&gt;
&lt;br /&gt;
:* If the table is locked with the option &#039;&#039;&#039;/Save&#039;&#039;&#039;, the tag state of each entry, the current order and the mode is saved on &amp;lt;code&amp;gt;lock&amp;lt;/code&amp;gt; and restored with the &amp;lt;code&amp;gt;unlock&amp;lt;/code&amp;gt; command. In this case in the critical section entries can only be modified, but not created or deleted. &lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; UNLOCK&lt;br /&gt;
Unlock the table item. &#039;&#039;&#039;Note&#039;&#039;&#039;: It&#039;s very important that for each successful &amp;lt;code&amp;gt;LOCK&amp;lt;/code&amp;gt;, an &amp;lt;code&amp;gt;UNLOCK&amp;lt;/code&amp;gt; is called!&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;lock_example.sts&amp;lt;/code&amp;gt; in the script examples directory for an example.&lt;br /&gt;
&lt;br /&gt;
== Setting the table mode ==&lt;br /&gt;
&lt;br /&gt;
This command is only applicable for [[Programmer_Guide/Concepts/Extended_table|extended tables]].&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; MODE &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;access format decimal&amp;lt;/var&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Set table mode (configuration / data) and general attributes.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A flag to switch the table mode to configuration mode (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) or data mode (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;); After creating an extended table the table may be in configuration or data mode, depending on the &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; command. See &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW table]]&amp;lt;/code&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;access&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This argument is currently meaningless. It is reserved for future database functions and should be set to &#039;&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&#039; or &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Selects the format to be used for file I/O: &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;amp;hellip;[[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Show_Format|show format]], &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&amp;amp;hellip;[[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Write_Format|write (default) format]].&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;decimal&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the character to be used as the decimal symbol. By default, the period &#039;&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;&#039; is used.&lt;br /&gt;
&lt;br /&gt;
Since {{STX}} 3.7.0, the &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW TABLE]]&amp;lt;/code&amp;gt; syntax has been modified to include the field definitions. The table mode is then automatically set to data, and hence this command may in future be pretty much obsolete, except for setting the decimal symbol.&lt;br /&gt;
&lt;br /&gt;
== Showing and hiding table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; /All|Tagged&lt;br /&gt;
&lt;br /&gt;
Make either all table entries visible (&amp;lt;code&amp;gt;/All&amp;lt;/code&amp;gt;) or only tagged entries (&amp;lt;code&amp;gt;/Tagged&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Only visible entries can be accessed, deleted or displayed (e.g. in a list box).&lt;br /&gt;
&lt;br /&gt;
== Sorting table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT [/Respect]&lt;br /&gt;
&lt;br /&gt;
Invert entry order (all tables) &amp;lt;!-- wie bitte!? --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For simple tables:&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT &amp;lt;var&amp;gt;dir&amp;lt;/var&amp;gt; [/Respect]&lt;br /&gt;
&lt;br /&gt;
For extended tables:&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT &amp;lt;var&amp;gt;fieldid dir&amp;lt;/var&amp;gt; [&amp;amp;hellip;] [/Respect]&lt;br /&gt;
&lt;br /&gt;
Sort table entries. For simple tables only the sort direction (&amp;lt;var&amp;gt;dir&amp;lt;/var&amp;gt;: Ascending (0), Descending (1)) can be selected.&lt;br /&gt;
&lt;br /&gt;
For extended tables, one or more fields and the sort direction can be specified. The sort function ignores the visibility setting and sorts all table entries. If the option &amp;lt;code&amp;gt;/Respect&amp;lt;/code&amp;gt; is used, strings are sorted respecting their case, otherwise the sort is case-insensitive.&lt;br /&gt;
&lt;br /&gt;
== Tagging table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; /Reset|Invert&lt;br /&gt;
&lt;br /&gt;
Reset (/Reset) or invert (/Invert) tag flags of all entries and set visibility to ALL.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table index&amp;lt;/var&amp;gt; /Tag|Untag|Invert&lt;br /&gt;
&lt;br /&gt;
Set, clear or invert tag flag of an entry. These options can also be used in all table commands assigning a value.&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;TAGS&amp;lt;/code&amp;gt; can be used to save and restore a table&#039;s tagged entries.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Table/SET_TABLE&amp;diff=10227</id>
		<title>Programmer Guide/Shell Items/Table/SET TABLE</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Table/SET_TABLE&amp;diff=10227"/>
		<updated>2018-11-13T07:25:33Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Copying to and from the clipboard */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Table_Item_Template}}&lt;br /&gt;
The &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&amp;amp;hellip;&amp;lt;/code&amp;gt; command is used to modify a table item. The sub-commands documented here are valid for all table types, unless otherwise specified.&lt;br /&gt;
&lt;br /&gt;
== Setting or Adding table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;amp;hellip; [ /Tag | /Untag ]&lt;br /&gt;
&lt;br /&gt;
When using the index of an &#039;&#039;existing&#039;&#039; entry for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, the command will modify the respective entry. When supplying the asterisk, &amp;amp;quot;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&amp;amp;quot;, for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, a &#039;&#039;new entry&#039;&#039; will be appended to the end of the table. Finally, when supplying a value for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; that is &#039;&#039;greater&#039;&#039; than the number of entries (&amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt;), the table will be padded with an appropriate number of empty entries in order to allow the entry &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to be set.&lt;br /&gt;
&lt;br /&gt;
The options &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt; may be used for setting or clearing the tag flag.&lt;br /&gt;
&lt;br /&gt;
Remember that with {{STX}} table indexes are always zero-based.&lt;br /&gt;
&lt;br /&gt;
=== Unstructured adding ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt; [ /Tag|Untag ]&lt;br /&gt;
&lt;br /&gt;
This statement is the sole way of adding entries to a simple table. The statement is applicable to extended tables, too. With extended tables, the field separator character may be used to separate fields in the string &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt;, meaning that &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt; will be parsed in the same way as entries are loaded from files.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The zero-based index of an existing entry to modify the entry&#039;s data or a zero-based index greater than the number of existing entries, to add a new entry. If the index is greater than the total number of entries, then all missing entries are created and initialized with default values. An asterisk may be used to append the table with a new entry at the next free index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt;&lt;br /&gt;
| The value to assign to the entry.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt;&lt;br /&gt;
| tag, or untag, the respective entry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Adding structured data to extended tables ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Tag|Untag ] [ /N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;|all|tagged ]&lt;br /&gt;
&lt;br /&gt;
The structured variant of setting entries allows to address the fields of an entry. It is thus applicable to extended tables only. Using the option &amp;lt;code&amp;gt;/N&amp;lt;/code&amp;gt;, you may even set multiple entries at the same time.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The zero-based index of an existing entry to modify the entry&#039;s data or a zero-based index greater than the number of existing entries, to add a new entry. If the index is greater than the total number of entries, then all missing entries are created and initialized with default values. An asterisk may be used to append the table with a new entry at the next free index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&amp;amp;hellip;&lt;br /&gt;
| A valid field id (as defined in the &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW TABLE]]&amp;lt;/code&amp;gt; command) or a field index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&amp;amp;hellip;&lt;br /&gt;
| The value to assign to the respective field.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt;&lt;br /&gt;
| tag, or untag, the respective entry&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Repeat this assignment for the next &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; entries (with &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; being an integer higher than, or equal to, 1), or for &#039;&#039;all&#039;&#039; entries from the current one to the last one (with &amp;lt;code&amp;gt;/N=all&amp;lt;/code&amp;gt;), or for all tagged entries from the current one to the last one (&amp;lt;code&amp;gt;/N=tagged&amp;lt;/code&amp;gt;). Note that the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tagged&amp;lt;/code&amp;gt; variants cannot append new entries to the table. Note also that you cannot set &#039;all&#039; entries, if only tagged entries are currently visible.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 // initialize the first field of the first 10 entries with the value 0.&lt;br /&gt;
 $#extTable 0 0 0 /N=10&lt;br /&gt;
&lt;br /&gt;
== Retrieving a table entry ==&lt;br /&gt;
&lt;br /&gt;
You can retrieve a table entry using the following syntax: &amp;lt;code&amp;gt;$#table[$#index]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring a table field==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET table CONFIG&amp;lt;/code&amp;gt; command is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]] (after all, [[Programmer_Guide/Concepts/Simple_table|simple tables]] do not have fields).&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CONFIG &amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mmode&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mval&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;header&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;align&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;sort&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt;&lt;br /&gt;
                          [ &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;setuserdefault&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;multirow&amp;lt;/var&amp;gt; ] ]&lt;br /&gt;
&lt;br /&gt;
Configure a table field. Define the display format (list box and list view) and field properties. The field must have been specified in the &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Table/NEW_TABLE|NEW TABLE]]&amp;lt;/code&amp;gt; command. The table must be in configuration mode (see &amp;lt;code&amp;gt;[[#Setting_the_table_mode|MODE]]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name or index of the field to be configured / updated.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt;&lt;br /&gt;
| Show (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or hide (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) the field in listbox and list view controls&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;&lt;br /&gt;
| Show both name and value (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or value only (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) in list box controls. This is only effective if &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt;&lt;br /&gt;
| The scaling factor for numeric fields; if a numeric field is accessed in the [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Show_Format|show format]], its value is multiplied with scale (used by both listboxes and listviews).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
| The [[Programmer Guide/Shell Items/Table/Show_Format|show format]] format string.&lt;br /&gt;
&lt;br /&gt;
For fields of type &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;, the format must contain a string tag (e.g.: &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%10.10s&amp;lt;/code&amp;gt;) For both numeric field types (&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;), the format must contain a float tag (&amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%g&amp;lt;/code&amp;gt;). The float tag is necessary for integer values because the scaling factor (&amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt;) is a floating number.&lt;br /&gt;
&lt;br /&gt;
Note that to display an integer (without decimals) you can use the format tag &amp;lt;code&amp;gt;%5.0f&amp;lt;/code&amp;gt;. This parameter controls the format for listboxes and listviews dialog controls.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mmode&amp;lt;/var&amp;gt;&lt;br /&gt;
| Enable (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or disable (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) missing value replacement. Missing value replacement is disabled by default. If enabled, missing values are replaced by &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mval&amp;lt;/var&amp;gt;&lt;br /&gt;
| The numeric id value of a &#039;missing value&#039; (e.g. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for f0 data). The default is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Missing value replacement only works for numerical fields (&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt;&lt;br /&gt;
| The replacement symbol (string) for missing values (e.g. &amp;lt;code&amp;gt;UNVOICED&amp;lt;/code&amp;gt; for f0 data). The strings &amp;lt;code&amp;gt;&amp;lt;empty&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;blank&amp;gt;&amp;lt;/code&amp;gt; can be used to replace a missing value with an empty string or a blank character. The default string is the empty string.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;header&amp;lt;/var&amp;gt;&lt;br /&gt;
| The text to be displayed in the field&#039;s column header of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width (in characters) of the column of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;align&amp;lt;/var&amp;gt;&lt;br /&gt;
| Align field left (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) or right (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;) in the column of a listview control; The first column of a listview is always. left-aligned (align is ignored)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;sort&amp;lt;/var&amp;gt;&lt;br /&gt;
| Enable (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;) or disable (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) the sort function of the column header of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt;&lt;br /&gt;
| If &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt; is set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, the respective field (column) of the table is NOT editable when the table is connected to a &amp;lt;code&amp;gt;ListView&amp;lt;/code&amp;gt; item. If &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt; is set to a number different from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, the respective field (column) of the table IS editable when the table is connected to a &amp;lt;code&amp;gt;ListView&amp;lt;/code&amp;gt; item. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a table containing all permissible values for this field. If this table (&amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;) is connected to a &amp;lt;code&amp;gt;listview&amp;lt;/code&amp;gt; item, and the &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; parameter is specified, the &amp;lt;code&amp;gt;listview&amp;lt;/code&amp;gt; displays a combobox in the associated column, and fills the combobox with &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt;&#039;s values.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt;&lt;br /&gt;
| The field id specifying the field in &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; where the values are stored. If &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; is a simple table, &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt; must be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt; parameter specifies whether this &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&#039;s field may only use values in the list table (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;), or whether any values may be entered (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the combobox is editable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt; parameter specifies whether invalid or empty data entered whilst editing should be replaced by the default value (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;=yes, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;=no). The first value in the list table is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;setuserdefault&amp;lt;/var&amp;gt;&lt;br /&gt;
| If set to &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, the last user-input for this field will be used as the respective default value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;multirow&amp;lt;/var&amp;gt;&lt;br /&gt;
| If set to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;, the field can display text in multiple rows. If set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;, text will be displayed in one row. The default is &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A field is defined once, but can be configured as often as needed. If an argument is not supplied or set to &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039;, the configuration for that parameter is not changed.See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a detailed example.&lt;br /&gt;
&lt;br /&gt;
== Table-to-table Copy ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; COPY &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt; &amp;amp;hellip; ] [ /Rows /Columns ]&lt;br /&gt;
&lt;br /&gt;
Copy data from the source table &amp;lt;var&amp;gt;srcTable&amp;lt;/var&amp;gt; (a parameter table or an extended table) to the target table &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; (a table of the same kind). If fields (&amp;lt;var&amp;gt;fieldids&amp;lt;/var&amp;gt;) are specified, then only these fields are copied. Otherwise all fields of the source table are copied.&lt;br /&gt;
&lt;br /&gt;
If the command is called &#039;&#039;without&#039;&#039; supplying options &amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;), then&lt;br /&gt;
# the source table must have the &#039;&#039;same format&#039;&#039;, i.e. the same fields, as the target table; and&lt;br /&gt;
# the source entries will &#039;&#039;overwrite&#039;&#039; the target entries (appending entries if necessary).&lt;br /&gt;
&lt;br /&gt;
If the command is called with either option &amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;, the command will &#039;&#039;not&#039;&#039; overwrite existing entries and fields in the target table. Rather than that, the command will &#039;&#039;modify&#039;&#039; the target table, appending source fields (which do not exist in the target table) and entries to the target table. Note that the target table must have enough undefined fields to accommodate the appended fields (i.e. fields created by &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Table/NEW_TABLE|NEW TABLE]]&amp;lt;/code&amp;gt;, but yet undefined).&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;COPY&amp;lt;/code&amp;gt; command works only with extended and with parameter tables.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt;:The table to copy from. This must be an extended or parameter table.&lt;br /&gt;
;&amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt;: An optional list of field IDs, separated by blank. If specified, only these fields are copied. If omitted, all fields are copied.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt;: If specified, fields from &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; are appended to &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;. The fields being copied must already be defined in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;. Note that the field data type is not checked (i.e. number fields can be copied to string fields of the same name).&lt;br /&gt;
;&amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;: If specified, entries from &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; are copied to the &#039;&#039;same&#039;&#039; entries in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;, &#039;&#039;overwriting their old value&#039;&#039;. Fields not defined in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; are automatically defined and configured. For this reason there must be enough undefined fields in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Copying between a Table and a Value Item ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; COPY &amp;lt;var&amp;gt;outputName&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt; [ /Row|Col ] [ /Write ]&lt;br /&gt;
&lt;br /&gt;
Copy data between a table and a [[Programmer_Guide/Shell_Items/Value|value object]]. If the option &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; is used, the table data is copied to the value item, otherwise (default) the value item data is copied to the table.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;outputName&amp;lt;/var&amp;gt;: The name of a value item to copy to or from.&lt;br /&gt;
;&amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt;: The entry index.&lt;br /&gt;
;&amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;: The field index.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Row&amp;lt;/code&amp;gt;: Copy table fields starting at row &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt; field &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;. The number of fields copied is determined by the size of the vector. The number of rows copied is determined by the number of vectors (only for array value items). This option is only for array and vector value items.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Col&amp;lt;/code&amp;gt;: Copy table entries starting at row &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt;, field &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;. The number of rows copied is determined by the size of the vector. The number of fields copied is determined by the number of vectors (array value items). This option is only for array and vector value items.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;: If the option &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; is specified, the table data is copied to the value item. If omitted, the value item data is copied to the table.&lt;br /&gt;
&lt;br /&gt;
== Copying to and from the clipboard ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD [ /Show|Write ]&lt;br /&gt;
&lt;br /&gt;
Copy the visible entries of a table to the clipboard. The entries can be copied either in:&lt;br /&gt;
# [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Show_Format|show-format]], i.e. using listbox display format, when supplying the &amp;lt;code&amp;gt;/Show&amp;lt;/code&amp;gt; option (or no option at all, since this is the default); or in&lt;br /&gt;
# [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Write_Format|write-format]], i.e. the format normally used when writing to a file. This is done with the &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; option.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;/Show&amp;lt;/code&amp;gt;: Use the [[Programmer Guide/Shell Items/Table/Show_Format|show format]] to format each entry string. This is the default.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;: Use the [[Programmer Guide/Shell Items/Table/Write_Format|write format]] to format each entry string.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD /Args arg1 arg2 ... [ /Show|Write ]&lt;br /&gt;
&lt;br /&gt;
Copy the content of the arguments to the clipboard. Each argument &amp;lt;code&amp;gt;argI&amp;lt;/code&amp;gt; can be a string (string is copied) or a table item (content of table is copied). The option &amp;lt;code&amp;gt;/Show|Write&amp;lt;/code&amp;gt; specifies the output format used for the table items (as described above).&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD /Read [ /Delete ] [ /Empty ]&lt;br /&gt;
&lt;br /&gt;
Read the last entry from the clipboard. This will work only if the format of the respective clipboard entry is either Unicode (&amp;lt;code&amp;gt;CF_UNICODETEXT&amp;lt;/code&amp;gt;) or text (&amp;lt;code&amp;gt;CF_TEXT&amp;lt;/code&amp;gt;).&lt;br /&gt;
;&amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt;: Mandatory option.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Delete&amp;lt;/code&amp;gt;: Delete the table entries before reading from the clipboard.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Empty&amp;lt;/code&amp;gt;: Empty the clipboard after a successful read.&lt;br /&gt;
&lt;br /&gt;
== Defining a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;* type name&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;count offset&amp;lt;/var&amp;gt;] [/Auto] [/Undefine]&lt;br /&gt;
&lt;br /&gt;
Note that the table must be in configuration mode (see [[XXX|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]]). Define the data type and name of field &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; (0 .. number of fields - 1). If an asterisk &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039; is given instead of &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, the first free (undefined) index is used. The argument &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is the id of the data type of the field. The argument &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is the name to be assigned to the field and must be a valid name string. The parameters &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; can be used to define multiple fields with one command (&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; = number of fields, &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; = base index). The option /Auto ensures the name is unique by concatenating the string name with an index (first value: 1). Note that once you have configured the table, you need to switch to DATA mode (see [[XXX|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]] below).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE&amp;lt;/code&amp;gt; command is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]], since only they support different types of fields.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;: The index of the field to be defined or &#039;*&#039; for the next free index.&lt;br /&gt;
;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;: The type of data to be stored. The following values are supported:&lt;br /&gt;
:&amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; - Strings which are valid names.&lt;br /&gt;
:&amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt; - Free text.&lt;br /&gt;
:&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; - Integer numbers.&lt;br /&gt;
:&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt; - Floating point numbers.&lt;br /&gt;
;&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;: The name to assign to the field. Note that this must also be a valid name.&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;: The number of fields to define. Used in conjunction with &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; for multiple definitions. Must be &amp;gt;= &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
;&amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt;: The index to start multiple definitions with. Must be &amp;gt;= &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Undefining a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; [&amp;amp;hellip; /Undefine]&lt;br /&gt;
&lt;br /&gt;
Undefine an existing field and delete contents of all field entries. Multiple undefines are possible by using the option &amp;lt;code&amp;gt;/Undefine&amp;lt;/code&amp;gt; in conjunction with multiple parameters.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;index|name&amp;lt;/var&amp;gt;: The index or name of the field(s) to undefine.&lt;br /&gt;
&lt;br /&gt;
== Renaming a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;fieldName&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;newName&amp;lt;/var&amp;gt; /Rename&lt;br /&gt;
&lt;br /&gt;
Rename an existing field.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fieldName&amp;lt;/var&amp;gt;: The existing field name.&lt;br /&gt;
;&amp;lt;var&amp;gt;newName&amp;lt;/var&amp;gt;: The new field name&lt;br /&gt;
;&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;&lt;br /&gt;
:The mandatory option &amp;lt;code&amp;gt;/Rename&amp;lt;/code&amp;gt;, specifying that this &amp;lt;code&amp;gt;DEFINE&amp;lt;/code&amp;gt; command should rename the field.&lt;br /&gt;
&lt;br /&gt;
An example can be found in the macro file &amp;lt;code&amp;gt;table_redefine.sts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Deleting table entries ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;] /Delete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Delete all visible entries or the specified entry &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== {{anchor|FIND|Finding table entries}} ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function implements a simple &#039;database query&#039; interface for tables. To create complex queries, it may be necessary to apply a set of &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt;s and possibly combine them with the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/FIND|FIND]]&amp;lt;/code&amp;gt; command. The &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function only searches tagged entries. Therefore, if you want to search the whole table, you must tag all the entries first. At the end of a query (any number of &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function calls), the tagged entries are those matching the search criteria.&lt;br /&gt;
&lt;br /&gt;
SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FIND&lt;br /&gt;
&lt;br /&gt;
Initialize a new find cycle. The tag flag of all entries are set and visibility is set to ALL. This command should be issued before a new query consisting of multiple commands is started. Instead of this command the option /Start can be used with the (first) &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FIND &amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;loper cexpr&amp;lt;/var&amp;gt; ...] [/Start /Invert /Tagged]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Search for all tagged entries matching the criteria defined by the &amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;loper&amp;lt;/var&amp;gt; arguments. The tag flags of all not matching entries are cleared. The logical operators are evaluated strictly from left to right. This means the result of all expressions of the left side of an operator is combined with the result of the expression on the right side. The logical operators &amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt; (=&amp;amp;&amp;amp;), &amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt; (=||) and &amp;lt;code&amp;gt;XOR&amp;lt;/code&amp;gt; (=^^) are defined. Note that the field value for simple tables is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The expression defining one search criterion (see Find expressions for details).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;loper&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The logical operator combining two search criteria; logical operators are applied from left to right, bracketing is not possible. The following operators are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt; - conjunction&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - conjunction&lt;br /&gt;
&amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt; - disjunction&lt;br /&gt;
&amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - disjunction&lt;br /&gt;
&amp;lt;code&amp;gt;XOR&amp;lt;/code&amp;gt; - exclusive disjunction&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;^^&amp;lt;/code&amp;gt; - exclusive disjunction&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Start&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Initialize a new find cycle (this is like a call to &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; without arguments and is applied before query).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Invert&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Invert all tag flags (applied after query).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Tagged&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Switch to visibility &amp;quot;tagged&amp;quot; (applied after query).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// search for entries where key field ends with &#039;ing&#039;&lt;br /&gt;
// and show only tagged entries&lt;br /&gt;
$#t find &#039;key:=I:*ing&#039; /Tagged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== {{Anchor|FINDEXPR|Find expressions}} ==&lt;br /&gt;
{{:Programmer_Guide/General_Descriptions/Find_Expressions}}&lt;br /&gt;
&lt;br /&gt;
== Regular expressions ==&lt;br /&gt;
&lt;br /&gt;
S_TOOLS&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;STx supports searches using POSIX regular expression. When using regular expressions, characters which have a special meaning in {{STX}} will need to be escaped using the {{STX}} escape character &amp;quot;&amp;lt;code&amp;gt;`&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|fieldid:cond:regex&lt;br /&gt;
|Match the value of a string field (type &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;).{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fieldid&lt;br /&gt;
|name or index of a string field (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for simple tables)&lt;br /&gt;
|-&lt;br /&gt;
|cond&lt;br /&gt;
|=RI&lt;br /&gt;
|matching regular expression ignoring case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|=RR&lt;br /&gt;
|matching regular expression respecting case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|!RI&lt;br /&gt;
|not matching regular expression even if ignoring case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|!RR&lt;br /&gt;
|not matching regular expression if respecting case.&lt;br /&gt;
|-&lt;br /&gt;
|regex&lt;br /&gt;
|a POSIX regular expression.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The script &amp;lt;code&amp;gt;regular_expressions.sts&amp;lt;/code&amp;gt; provides examples of usage.&lt;br /&gt;
&lt;br /&gt;
== Formatting table fields ==&lt;br /&gt;
&lt;br /&gt;
Formatting is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]].&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FORMAT &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;numfmt &amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;intfmt&amp;lt;/var&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Configuration of the write format used to save and load tables from files (see [[XXX|&amp;lt;code&amp;gt;SET file LOAD&amp;lt;/code&amp;gt;]] and [[XXX|&amp;lt;code&amp;gt;SET file SAVE&amp;lt;/code&amp;gt;]]). You can configure the [[Programmer Guide/Shell Items/Table/Show_Format|show format]] (used to display tables in the GUI) using the [[Programmer_Guide/Shell_Items/Table/SET_TABLE#Configuring_a_table_field|&amp;lt;code&amp;gt;CONFIG&amp;lt;/code&amp;gt;]] command.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - Store all fields even if they are empty. Assigned fields have the format &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt; and empty fields have just the &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;. E.g.: &amp;lt;code&amp;gt;10.0 ; 10.1 ; ; 10.3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;1 &amp;lt;/code&amp;gt; - Only assigned fields are stored. Every assigned field outputs the following string &amp;lt;code&amp;gt;fieldindex&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;. E.g.: &amp;lt;code&amp;gt;c0=10.0 ; c1=10.1 ; c2= ; c3=10.3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note: In order to load a table successfully, it must be loaded using the same format setting as was used to save it.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;&lt;br /&gt;
:delimiter string used to separate fields in the output line (for both formats). The special symbol &#039;%t&#039; can be used to specify the tab character. Consecutive white spaces (blanks and tabs) are interpreted as one delimiter. E.g. &amp;quot; 1 2 3&amp;quot; is interpreted as three fields, whereas &amp;quot;:1::2:3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt;&lt;br /&gt;
:delimiter string used to separate the &amp;lt;code&amp;gt;fieldindex&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; (for format &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; only)&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;numfmt&amp;lt;/var&amp;gt;&lt;br /&gt;
:Float format string used for all fields of type &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;. This can be any valid C string format specifier.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;intfmt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Integer (!) format string used for all fields of type &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;. This can be any valid C string format specifier.&lt;br /&gt;
&lt;br /&gt;
You can set the decimal symbol using the [[#Setting_the_table_mode|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]] command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
///////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//    Macro:          load_a_file_into_a_table.sts&lt;br /&gt;
//    Description:    load the contents of a numeric text file into a parameter&lt;br /&gt;
//                    table and displays the table if desired&lt;br /&gt;
//    Parameters:     #fileName    the file to load&lt;br /&gt;
//                    #mode        0    silent&lt;br /&gt;
//                                 1    show table&lt;br /&gt;
//                                 2    return table&lt;br /&gt;
//    Return:         0 on success, non-zero on failure&lt;br /&gt;
//    Usage:          load_a_file_into_a_table [file] ; [show]&lt;br /&gt;
//    Author:         Jonnie White&lt;br /&gt;
//    History:        2005-03-31    jw    created&lt;br /&gt;
//                    2005-04-27    jw    added new mode (return table) and file &lt;br /&gt;
//                                        parameter&lt;br /&gt;
//&lt;br /&gt;
///////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
[macro load_a_file_into_a_table]&lt;br /&gt;
    #fileName := set &#039;$scriptDirectory\input_matrix_small.txt&#039;&lt;br /&gt;
    #mode := 1&lt;br /&gt;
    readvar #argv #fileName&#039;;&#039;#mode&lt;br /&gt;
&lt;br /&gt;
    // create a parameter table with 4 fields&lt;br /&gt;
    #tableItem := new table * 4 /Parameter number:f:4&lt;br /&gt;
    if &#039;$#tableItem&#039; == * em -1 ; failed to create a table&lt;br /&gt;
    &lt;br /&gt;
    // set the write format to blank separated&lt;br /&gt;
    $#tableItem format 0 &#039; &#039;&lt;br /&gt;
    &lt;br /&gt;
    // create the read-only file object associated with fileName&lt;br /&gt;
    #fileItem := new file * &#039;$#fileName&#039; /Text /Read&lt;br /&gt;
    if &#039;$#fileItem&#039; == * em -1 ; failed to open the file $#fileName&lt;br /&gt;
    &lt;br /&gt;
    // load the file into the table&lt;br /&gt;
    $#fileItem load $#tableItem&lt;br /&gt;
    if &#039;$rc&#039; &amp;gt; 0 em -1 ; failed to load file $#fileName into table $#tableItem&lt;br /&gt;
    &lt;br /&gt;
    // show the table&lt;br /&gt;
    if &#039;$#mode&#039; == 1 showitem $#tableItem&lt;br /&gt;
    &lt;br /&gt;
    // return table&lt;br /&gt;
    if &#039;$#mode&#039; == 2 then&lt;br /&gt;
        delete $#fileItem&lt;br /&gt;
        exit 1 set &#039;$#tableItem&#039;&lt;br /&gt;
    else&lt;br /&gt;
        // clean up&lt;br /&gt;
        delete $#fileItem $#tableItem&lt;br /&gt;
    end&lt;br /&gt;
exit 1 int 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that if you need to save a table containing empty fields, you should *not* use a blank or a tab character as the delimiter. If you do, the empty fields will be omitted on loading the table.&lt;br /&gt;
&lt;br /&gt;
== Locking / Unlocking the table ==&lt;br /&gt;
&lt;br /&gt;
The use of &#039;&#039;&#039;lock/unlock&#039;&#039;&#039; is only important, if a table item is (or may be) used by more than one thread. In {{STX}} shells, spu items and display item are running in their own thread.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; LOCK [/Save]&lt;br /&gt;
Lock the table item. The execution of the calling shell is stopped, until the item can be locked. If locked, only the shell which locked it has access to the item until it is explicitly unlocked with the command &amp;lt;code&amp;gt;UNLOCK&amp;lt;/code&amp;gt;. Always beware of deadlocks.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; LOCK &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; [Save]&lt;br /&gt;
Try to lock the table item, but wait only the specified time. This command returns &#039;&#039;&#039;0&#039;&#039;&#039; (success) if the lock request was successful within the timeout, and a non-zero error code if not. If the caller already &#039;&#039;holds&#039;&#039; the lock, the command will fail immediately. This makes sense because, since the caller is the owner, it cannot release it whilst its waiting. The argument &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; specifies the maximum lock-timeout in milliseconds and must be a number greater than zero.&lt;br /&gt;
&lt;br /&gt;
:* If the table is locked with the option &#039;&#039;&#039;/Save&#039;&#039;&#039;, the tag state of each entry, the current order and the mode is saved on &amp;lt;code&amp;gt;lock&amp;lt;/code&amp;gt; and restored with the &amp;lt;code&amp;gt;unlock&amp;lt;/code&amp;gt; command. In this case in the critical section entries can only be modified, but not created or deleted. &lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; UNLOCK&lt;br /&gt;
Unlock the table item. &#039;&#039;&#039;Note&#039;&#039;&#039;: It&#039;s very important that for each successful &amp;lt;code&amp;gt;LOCK&amp;lt;/code&amp;gt;, an &amp;lt;code&amp;gt;UNLOCK&amp;lt;/code&amp;gt; is called!&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;lock_example.sts&amp;lt;/code&amp;gt; in the script examples directory for an example.&lt;br /&gt;
&lt;br /&gt;
== Setting the table mode ==&lt;br /&gt;
&lt;br /&gt;
This command is only applicable for [[Programmer_Guide/Concepts/Extended_table|extended tables]].&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; MODE &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;access format decimal&amp;lt;/var&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Set table mode (configuration / data) and general attributes.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A flag to switch the table mode to configuration mode (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) or data mode (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;); After creating an extended table the table may be in configuration or data mode, depending on the &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; command. See &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW table]]&amp;lt;/code&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;access&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This argument is currently meaningless. It is reserved for future database functions and should be set to &#039;&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&#039; or &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Selects the format to be used for file I/O: &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;amp;hellip;[[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Show_Format|show format]], &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&amp;amp;hellip;[[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#The_Write_Format|write (default) format]].&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;decimal&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the character to be used as the decimal symbol. By default, the period &#039;&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;&#039; is used.&lt;br /&gt;
&lt;br /&gt;
Since {{STX}} 3.7.0, the &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW TABLE]]&amp;lt;/code&amp;gt; syntax has been modified to include the field definitions. The table mode is then automatically set to data, and hence this command may in future be pretty much obsolete, except for setting the decimal symbol.&lt;br /&gt;
&lt;br /&gt;
== Showing and hiding table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; /All|Tagged&lt;br /&gt;
&lt;br /&gt;
Make either all table entries visible (&amp;lt;code&amp;gt;/All&amp;lt;/code&amp;gt;) or only tagged entries (&amp;lt;code&amp;gt;/Tagged&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Only visible entries can be accessed, deleted or displayed (e.g. in a list box).&lt;br /&gt;
&lt;br /&gt;
== Sorting table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT [/Respect]&lt;br /&gt;
&lt;br /&gt;
Invert entry order (all tables) &amp;lt;!-- wie bitte!? --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For simple tables:&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT &amp;lt;var&amp;gt;dir&amp;lt;/var&amp;gt; [/Respect]&lt;br /&gt;
&lt;br /&gt;
For extended tables:&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT &amp;lt;var&amp;gt;fieldid dir&amp;lt;/var&amp;gt; [&amp;amp;hellip;] [/Respect]&lt;br /&gt;
&lt;br /&gt;
Sort table entries. For simple tables only the sort direction (&amp;lt;var&amp;gt;dir&amp;lt;/var&amp;gt;: Ascending (0), Descending (1)) can be selected.&lt;br /&gt;
&lt;br /&gt;
For extended tables, one or more fields and the sort direction can be specified. The sort function ignores the visibility setting and sorts all table entries. If the option &amp;lt;code&amp;gt;/Respect&amp;lt;/code&amp;gt; is used, strings are sorted respecting their case, otherwise the sort is case-insensitive.&lt;br /&gt;
&lt;br /&gt;
== Tagging table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; /Reset|Invert&lt;br /&gt;
&lt;br /&gt;
Reset (/Reset) or invert (/Invert) tag flags of all entries and set visibility to ALL.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table index&amp;lt;/var&amp;gt; /Tag|Untag|Invert&lt;br /&gt;
&lt;br /&gt;
Set, clear or invert tag flag of an entry. These options can also be used in all table commands assigning a value.&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;TAGS&amp;lt;/code&amp;gt; can be used to save and restore a table&#039;s tagged entries.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/AVR&amp;diff=10215</id>
		<title>Programmer Guide/SPU Reference/AVR</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/AVR&amp;diff=10215"/>
		<updated>2018-10-16T10:00:17Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Average input &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; over evaluation cycles.&lt;br /&gt;
==&amp;lt;code&amp;gt;[SPU AVR &amp;lt;var&amp;gt;X TYP T RS&amp;lt;/var&amp;gt; OUT &amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt;==&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!input !!description !!data type !!value type!!default value&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt;||data to be averaged ||number, vector, matrix ||variable &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;||averaging method ||number (int.), string||constant&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;||averaging parameter, depends on method ||number or n.c.||&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=1&amp;amp;rarr;variable&amp;lt;BR&amp;gt;&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;&amp;amp;ne;2&amp;amp;rarr;constant&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt;||reset flag||number or n.c. ||variable  &lt;br /&gt;
|-&lt;br /&gt;
!output !!description !!data type !!value type!!comment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;||averaged input data ||same type as &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; ||variable &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Description:&lt;br /&gt;
The averaging algorithm is defined by the inputs &amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;. The atom averages the elements &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt;[&#039;&#039;i&#039;&#039;,&#039;&#039;j&#039;&#039;]&amp;lt;sub&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/sub&amp;gt; over evaluation cycles t (&#039;&#039;i&#039;&#039;=row index, &#039;&#039;j&#039;&#039;=column index, &#039;&#039;t&#039;&#039;=cycle counter) and stores the averaged value in the element &amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;[&#039;&#039;i&#039;&#039;,&#039;&#039;j&#039;&#039;]&amp;lt;sub&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/sub&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The cycle counter &#039;&#039;t&#039;&#039; is initialized with 0 and incremented by 1 after each evaluation cycle. The cycle counter is reset, if the input &amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt; is set to a value greater than &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. The input &amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt; is checked each time the SPU is started.&lt;br /&gt;
:;infinite average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;linear&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
\frac{1}{t+1}(t.Y[i,j]_{t-1}+X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;running average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;linear&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;amp;gt;&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;; &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is the (integer) number of averaging cycles &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
\frac{1}{t+1}\sum_{z=0}^t X[i,j]_z &amp;amp; \mbox{if }0\leqslant t &amp;lt; T \\&lt;br /&gt;
\frac{1}{T}\sum_{z=0}^{T-1}X[i,j]_{t-z} &amp;amp; \mbox{if }t\geqslant T &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;exponential average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;exponential&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;amp;lt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;amp;lt;&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;; &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is the averaging factor &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0\mbox{ (or }T\mbox{ out of range)}\\&lt;br /&gt;
\sqrt{T}.Y[i,j]_{t-1}+(1-\sqrt{T}).X[i,j]_t &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;minimum:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;minimum&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
min(Y[i,j]_{t-1},X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;maximum:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;maximum&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
max(Y[i,j]_{t-1},X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since {{STx}} version 4.5.0 the following two new average modes are available, which were used to implement the spectral averaging mode &amp;lt;code&amp;gt;power&amp;lt;/code&amp;gt; of the applications [[User Guide/Spectrogram and Parameter Viewer|Viewer2]]  (sectioner) and [[User Guide/Spectrum Viewer|Viewer3]].&lt;br /&gt;
&lt;br /&gt;
:;power:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;power&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::* each input element X&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is squared&lt;br /&gt;
::* same averaging as for TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is performed&lt;br /&gt;
::* square root of each output element Y&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is taken&lt;br /&gt;
:;db-power:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;dbpower&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::* each input element X&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is converted from dB to squared magnitude (power)&lt;br /&gt;
::* same averaging as for TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is performed&lt;br /&gt;
::* each output element Y&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is converted to dB&lt;br /&gt;
;See also:&lt;br /&gt;
&amp;lt;[[../#Signal Processing Atoms|SP-atoms]]&amp;gt;&lt;br /&gt;
&amp;lt;!-- AN, 2.5.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/AVR&amp;diff=10214</id>
		<title>Programmer Guide/SPU Reference/AVR</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/AVR&amp;diff=10214"/>
		<updated>2018-10-16T09:57:11Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Average input &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; over evaluation cycles.&lt;br /&gt;
==&amp;lt;code&amp;gt;[SPU AVR &amp;lt;var&amp;gt;X TYP T RS&amp;lt;/var&amp;gt; OUT &amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt;==&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!input !!description !!data type !!value type!!default value&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt;||data to be averaged ||number, vector, matrix ||variable &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;||averaging method ||number (int.), string||constant&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;||averaging parameter, depends on method ||number or n.c.||&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=1&amp;amp;rarr;variable&amp;lt;BR&amp;gt;&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;&amp;amp;ne;2&amp;amp;rarr;constant&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt;||reset flag||number or n.c. ||variable  &lt;br /&gt;
|-&lt;br /&gt;
!output !!description !!data type !!value type!!comment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;||averaged input data ||same type as &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; ||variable &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Description:&lt;br /&gt;
The averaging algorithm is defined by the inputs &amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;. The atom averages the elements &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt;[&#039;&#039;i&#039;&#039;,&#039;&#039;j&#039;&#039;]&amp;lt;sub&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/sub&amp;gt; over evaluation cycles t (&#039;&#039;i&#039;&#039;=row index, &#039;&#039;j&#039;&#039;=column index, &#039;&#039;t&#039;&#039;=cycle counter) and stores the averaged value in the element &amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;[&#039;&#039;i&#039;&#039;,&#039;&#039;j&#039;&#039;]&amp;lt;sub&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/sub&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The cycle counter &#039;&#039;t&#039;&#039; is initialized with 0 and incremented by 1 after each evaluation cycle. The cycle counter is reset, if the input &amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt; is set to a value greater than &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. The input &amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt; is checked each time the SPU is started.&lt;br /&gt;
:;infinite average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;linear&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
\frac{1}{t+1}(t.Y[i,j]_{t-1}+X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;running average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;linear&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;amp;gt;&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;; &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is the (integer) number of averaging cycles &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
\frac{1}{t+1}\sum_{z=0}^t X[i,j]_z &amp;amp; \mbox{if }0\leqslant t &amp;lt; T \\&lt;br /&gt;
\frac{1}{T}\sum_{z=0}^{T-1}X[i,j]_{t-z} &amp;amp; \mbox{if }t\geqslant T &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;exponential average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;exponential&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;amp;lt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;amp;lt;&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;; &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is the averaging factor &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0\mbox{ (or }T\mbox{ out of range)}\\&lt;br /&gt;
\sqrt{T}.Y[i,j]_{t-1}+(1-\sqrt{T}).X[i,j]_t &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;minimum:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;minimum&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
min(Y[i,j]_{t-1},X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;maximum:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;maximum&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
max(Y[i,j]_{t-1},X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since {{STx}} version 4.5.0 the following two new average modes are available, which were used to implement the spectral averaging mode &amp;lt;code&amp;gt;power&amp;lt;/code&amp;gt; of the applications &amp;lt;code&amp;gt;Viewer2&amp;lt;/code&amp;gt; (sectioner) and &amp;lt;code&amp;gt;Viewer3&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:;power:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;power&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::* each input element X&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is squared&lt;br /&gt;
::* same averaging as for TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is performed&lt;br /&gt;
::* square root of each output element Y&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is taken&lt;br /&gt;
:;db-power:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;dbpower&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::* each input element X&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is converted from dB to squared magnitude (power)&lt;br /&gt;
::* same averaging as for TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is performed&lt;br /&gt;
::* each output element Y&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is converted to dB&lt;br /&gt;
;See also:&lt;br /&gt;
&amp;lt;[[../#Signal Processing Atoms|SP-atoms]]&amp;gt;&lt;br /&gt;
&amp;lt;!-- AN, 2.5.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/AVR&amp;diff=10213</id>
		<title>Programmer Guide/SPU Reference/AVR</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/AVR&amp;diff=10213"/>
		<updated>2018-10-16T09:56:46Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Average input &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; over evaluation cycles.&lt;br /&gt;
==&amp;lt;code&amp;gt;[SPU AVR &amp;lt;var&amp;gt;X TYP T RS&amp;lt;/var&amp;gt; OUT &amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt;==&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!input !!description !!data type !!value type!!default value&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt;||data to be averaged ||number, vector, matrix ||variable &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;||averaging method ||number (int.), string||constant&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;||averaging parameter, depends on method ||number or n.c.||&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=1&amp;amp;rarr;variable&amp;lt;BR&amp;gt;&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;&amp;amp;ne;2&amp;amp;rarr;constant&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt;||reset flag||number or n.c. ||variable  &lt;br /&gt;
|-&lt;br /&gt;
!output !!description !!data type !!value type!!comment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;||averaged input data ||same type as &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; ||variable &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Description:&lt;br /&gt;
The averaging algorithm is defined by the inputs &amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;. The atom averages the elements &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt;[&#039;&#039;i&#039;&#039;,&#039;&#039;j&#039;&#039;]&amp;lt;sub&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/sub&amp;gt; over evaluation cycles t (&#039;&#039;i&#039;&#039;=row index, &#039;&#039;j&#039;&#039;=column index, &#039;&#039;t&#039;&#039;=cycle counter) and stores the averaged value in the element &amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;[&#039;&#039;i&#039;&#039;,&#039;&#039;j&#039;&#039;]&amp;lt;sub&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/sub&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The cycle counter &#039;&#039;t&#039;&#039; is initialized with 0 and incremented by 1 after each evaluation cycle. The cycle counter is reset, if the input &amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt; is set to a value greater than &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. The input &amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt; is checked each time the SPU is started.&lt;br /&gt;
:;infinite average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;linear&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
\frac{1}{t+1}(t.Y[i,j]_{t-1}+X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;running average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;linear&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;amp;gt;&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;; &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is the (integer) number of averaging cycles &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
\frac{1}{t+1}\sum_{z=0}^t X[i,j]_z &amp;amp; \mbox{if }0\leqslant t &amp;lt; T \\&lt;br /&gt;
\frac{1}{T}\sum_{z=0}^{T-1}X[i,j]_{t-z} &amp;amp; \mbox{if }t\geqslant T &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;exponential average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;exponential&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;amp;lt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;amp;lt;&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;; &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is the averaging factor &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0\mbox{ (or }T\mbox{ out of range)}\\&lt;br /&gt;
\sqrt{T}.Y[i,j]_{t-1}+(1-\sqrt{T}).X[i,j]_t &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;minimum:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;minimum&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
min(Y[i,j]_{t-1},X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;maximum:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;maximum&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
max(Y[i,j]_{t-1},X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since {{STx}} version 4.5.0 following two new average modes are available, which were used to implement the spectral averaging mode &amp;lt;code&amp;gt;power&amp;lt;/code&amp;gt; of the applications &amp;lt;code&amp;gt;Viewer2&amp;lt;/code&amp;gt; (sectioner) and &amp;lt;code&amp;gt;Viewer3&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:;power:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;power&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::* each input element X&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is squared&lt;br /&gt;
::* same averaging as for TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is performed&lt;br /&gt;
::* square root of each output element Y&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is taken&lt;br /&gt;
:;db-power:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;dbpower&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::* each input element X&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is converted from dB to squared magnitude (power)&lt;br /&gt;
::* same averaging as for TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is performed&lt;br /&gt;
::* each output element Y&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is converted to dB&lt;br /&gt;
;See also:&lt;br /&gt;
&amp;lt;[[../#Signal Processing Atoms|SP-atoms]]&amp;gt;&lt;br /&gt;
&amp;lt;!-- AN, 2.5.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/AVR&amp;diff=10212</id>
		<title>Programmer Guide/SPU Reference/AVR</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/AVR&amp;diff=10212"/>
		<updated>2018-10-16T09:54:13Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Average input &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; over evaluation cycles.&lt;br /&gt;
==&amp;lt;code&amp;gt;[SPU AVR &amp;lt;var&amp;gt;X TYP T RS&amp;lt;/var&amp;gt; OUT &amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt;==&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!input !!description !!data type !!value type!!default value&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt;||data to be averaged ||number, vector, matrix ||variable &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;||averaging method ||number (int.), string||constant&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;||averaging parameter, depends on method ||number or n.c.||&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=1&amp;amp;rarr;variable&amp;lt;BR&amp;gt;&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;&amp;amp;ne;2&amp;amp;rarr;constant&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt;||reset flag||number or n.c. ||variable  &lt;br /&gt;
|-&lt;br /&gt;
!output !!description !!data type !!value type!!comment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;||averaged input data ||same type as &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; ||variable &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Description:&lt;br /&gt;
The averaging algorithm is defined by the inputs &amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;. The atom averages the elements &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt;[&#039;&#039;i&#039;&#039;,&#039;&#039;j&#039;&#039;]&amp;lt;sub&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/sub&amp;gt; over evaluation cycles t (&#039;&#039;i&#039;&#039;=row index, &#039;&#039;j&#039;&#039;=column index, &#039;&#039;t&#039;&#039;=cycle counter) and stores the averaged value in the element &amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;[&#039;&#039;i&#039;&#039;,&#039;&#039;j&#039;&#039;]&amp;lt;sub&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/sub&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The cycle counter &#039;&#039;t&#039;&#039; is initialized with 0 and incremented by 1 after each evaluation cycle. The cycle counter is reset, if the input &amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt; is set to a value greater than &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. The input &amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt; is checked each time the SPU is started.&lt;br /&gt;
:;infinite average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;linear&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
\frac{1}{t+1}(t.Y[i,j]_{t-1}+X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;running average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;linear&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;amp;gt;&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;; &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is the (integer) number of averaging cycles &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
\frac{1}{t+1}\sum_{z=0}^t X[i,j]_z &amp;amp; \mbox{if }0\leqslant t &amp;lt; T \\&lt;br /&gt;
\frac{1}{T}\sum_{z=0}^{T-1}X[i,j]_{t-z} &amp;amp; \mbox{if }t\geqslant T &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;exponential average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;exponential&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;amp;lt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;amp;lt;&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;; &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is the averaging factor &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0\mbox{ (or }T\mbox{ out of range)}\\&lt;br /&gt;
\sqrt{T}.Y[i,j]_{t-1}+(1-\sqrt{T}).X[i,j]_t &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;minimum:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;minimum&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
min(Y[i,j]_{t-1},X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;maximum:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;maximum&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
max(Y[i,j]_{t-1},X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
;Additional average modes in {{STx}} version &amp;amp;ge; 4.5.0&lt;br /&gt;
:used for spectral averaging in &amp;lt;code&amp;gt;Viewer2&amp;lt;/code&amp;gt; (sectioner) and &amp;lt;code&amp;gt;Viewer3&amp;lt;/code&amp;gt;&lt;br /&gt;
:;power:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;power&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::* each input element X&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is squared&lt;br /&gt;
::* same averaging as for TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is performed&lt;br /&gt;
::* square root of each output element Y&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is taken&lt;br /&gt;
:;db-power:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;dbpower&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::* each input element X&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is converted from dB to squared magnitude (power)&lt;br /&gt;
::* same averaging as for TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is performed&lt;br /&gt;
::* each output element Y&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is converted to dB&lt;br /&gt;
;See also:&lt;br /&gt;
&amp;lt;[[../#Signal Processing Atoms|SP-atoms]]&amp;gt;&lt;br /&gt;
&amp;lt;!-- AN, 2.5.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/AVR&amp;diff=10211</id>
		<title>Programmer Guide/SPU Reference/AVR</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/AVR&amp;diff=10211"/>
		<updated>2018-10-16T09:48:54Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Average input &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; over evaluation cycles.&lt;br /&gt;
==&amp;lt;code&amp;gt;[SPU AVR &amp;lt;var&amp;gt;X TYP T RS&amp;lt;/var&amp;gt; OUT &amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt;==&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!input !!description !!data type !!value type!!default value&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt;||data to be averaged ||number, vector, matrix ||variable &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;||averaging method ||number (int.), string||constant&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;||averaging parameter, depends on method ||number or n.c.||&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=1&amp;amp;rarr;variable&amp;lt;BR&amp;gt;&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;&amp;amp;ne;2&amp;amp;rarr;constant&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt;||reset flag||number or n.c. ||variable  &lt;br /&gt;
|-&lt;br /&gt;
!output !!description !!data type !!value type!!comment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;||averaged input data ||same type as &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; ||variable &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Description:&lt;br /&gt;
The averaging algorithm is defined by the inputs &amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;. The atom averages the elements &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt;[&#039;&#039;i&#039;&#039;,&#039;&#039;j&#039;&#039;]&amp;lt;sub&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/sub&amp;gt; over evaluation cycles t (&#039;&#039;i&#039;&#039;=row index, &#039;&#039;j&#039;&#039;=column index, &#039;&#039;t&#039;&#039;=cycle counter) and stores the averaged value in the element &amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;[&#039;&#039;i&#039;&#039;,&#039;&#039;j&#039;&#039;]&amp;lt;sub&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/sub&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The cycle counter &#039;&#039;t&#039;&#039; is initialized with 0 and incremented by 1 after each evaluation cycle. The cycle counter is reset, if the input &amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt; is set to a value greater than &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. The input &amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt; is checked each time the SPU is started.&lt;br /&gt;
:;infinite average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;linear&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
\frac{1}{t+1}(t.Y[i,j]_{t-1}+X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;running average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;linear&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;amp;gt;&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;; &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is the (integer) number of averaging cycles &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
\frac{1}{t+1}\sum_{z=0}^t X[i,j]_z &amp;amp; \mbox{if }0\leqslant t &amp;lt; T \\&lt;br /&gt;
\frac{1}{T}\sum_{z=0}^{T-1}X[i,j]_{t-z} &amp;amp; \mbox{if }t\geqslant T &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;exponential average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;exponential&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;amp;lt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;amp;lt;&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;; &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is the averaging factor &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0\mbox{ (or }T\mbox{ out of range)}\\&lt;br /&gt;
\sqrt{T}.Y[i,j]_{t-1}+(1-\sqrt{T}).X[i,j]_t &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;minimum:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;minimum&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
min(Y[i,j]_{t-1},X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;maximum:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;maximum&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
max(Y[i,j]_{t-1},X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
;Additional average modes in {{STx}} version &amp;gt;= 4.5.0&lt;br /&gt;
:;power:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;power&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::* each input element X&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is squared&lt;br /&gt;
::* same averaging as for TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is performed&lt;br /&gt;
::* square root of each output element Y&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is taken&lt;br /&gt;
:;db-power:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;dbpower&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::* each input element X&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is converted from dB to squared magnitude (power)&lt;br /&gt;
::* same averaging as for TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; is performed&lt;br /&gt;
::* each output element Y&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is converted to dB&lt;br /&gt;
;See also:&lt;br /&gt;
&amp;lt;[[../#Signal Processing Atoms|SP-atoms]]&amp;gt;&lt;br /&gt;
&amp;lt;!-- AN, 2.5.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/AVR&amp;diff=10210</id>
		<title>Programmer Guide/SPU Reference/AVR</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/AVR&amp;diff=10210"/>
		<updated>2018-10-16T09:44:29Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Average input &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; over evaluation cycles.&lt;br /&gt;
==&amp;lt;code&amp;gt;[SPU AVR &amp;lt;var&amp;gt;X TYP T RS&amp;lt;/var&amp;gt; OUT &amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt;==&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!input !!description !!data type !!value type!!default value&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt;||data to be averaged ||number, vector, matrix ||variable &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;||averaging method ||number (int.), string||constant&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;||averaging parameter, depends on method ||number or n.c.||&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=1&amp;amp;rarr;variable&amp;lt;BR&amp;gt;&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;&amp;amp;ne;2&amp;amp;rarr;constant&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt;||reset flag||number or n.c. ||variable  &lt;br /&gt;
|-&lt;br /&gt;
!output !!description !!data type !!value type!!comment&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;||averaged input data ||same type as &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; ||variable &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Description:&lt;br /&gt;
The averaging algorithm is defined by the inputs &amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;. The atom averages the elements &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt;[&#039;&#039;i&#039;&#039;,&#039;&#039;j&#039;&#039;]&amp;lt;sub&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/sub&amp;gt; over evaluation cycles t (&#039;&#039;i&#039;&#039;=row index, &#039;&#039;j&#039;&#039;=column index, &#039;&#039;t&#039;&#039;=cycle counter) and stores the averaged value in the element &amp;lt;var&amp;gt;Y&amp;lt;/var&amp;gt;[&#039;&#039;i&#039;&#039;,&#039;&#039;j&#039;&#039;]&amp;lt;sub&amp;gt;&#039;&#039;t&#039;&#039;&amp;lt;/sub&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The cycle counter &#039;&#039;t&#039;&#039; is initialized with 0 and incremented by 1 after each evaluation cycle. The cycle counter is reset, if the input &amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt; is set to a value greater than &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. The input &amp;lt;var&amp;gt;RS&amp;lt;/var&amp;gt; is checked each time the SPU is started.&lt;br /&gt;
:;infinite average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;linear&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
\frac{1}{t+1}(t.Y[i,j]_{t-1}+X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;running average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;linear&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;amp;gt;&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;; &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is the (integer) number of averaging cycles &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
\frac{1}{t+1}\sum_{z=0}^t X[i,j]_z &amp;amp; \mbox{if }0\leqslant t &amp;lt; T \\&lt;br /&gt;
\frac{1}{T}\sum_{z=0}^{T-1}X[i,j]_{t-z} &amp;amp; \mbox{if }t\geqslant T &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;exponential average:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;exponential&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;amp;lt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt;&amp;amp;lt;&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;; &amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is the averaging factor &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0\mbox{ (or }T\mbox{ out of range)}\\&lt;br /&gt;
\sqrt{T}.Y[i,j]_{t-1}+(1-\sqrt{T}).X[i,j]_t &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;minimum:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;minimum&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
min(Y[i,j]_{t-1},X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;maximum:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;maximum&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::&amp;lt;math&amp;gt;Y[i,j]_t = &lt;br /&gt;
\begin{cases} &lt;br /&gt;
X[i,j]_t &amp;amp; \mbox{if }t=0 \\&lt;br /&gt;
max(Y[i,j]_{t-1},X[i,j]_t) &amp;amp; \mbox{if }t&amp;gt;0 &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:;power:&lt;br /&gt;
::&amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;power&amp;lt;/code&amp;gt;&lt;br /&gt;
::&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is not used &lt;br /&gt;
::* each input element X&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is squared&lt;br /&gt;
::* same averaging as for TYP&amp;lt;/var&amp;gt;=&amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; is performed&lt;br /&gt;
::* square root of each output element Y&amp;lt;sub&amp;gt;i,j&amp;lt;/sub&amp;gt; is taken&lt;br /&gt;
;See also:&lt;br /&gt;
&amp;lt;[[../#Signal Processing Atoms|SP-atoms]]&amp;gt;&lt;br /&gt;
&amp;lt;!-- AN, 2.5.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/MORLET&amp;diff=10208</id>
		<title>Programmer Guide/SPU Reference/MORLET</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/SPU_Reference/MORLET&amp;diff=10208"/>
		<updated>2018-10-16T07:42:34Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
====MORLET - wavelet transform====&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MORLET &amp;lt;var&amp;gt;X&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;SP&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;SR&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;DF&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;FB&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;LB&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;F0&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;ACUT&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;TYP&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;O&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;FMT&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;MAMI&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;MAMX&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;MPV&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Inputs:=====&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|X&lt;br /&gt;
|input signal; length depends on lowest frequency&lt;br /&gt;
|-&lt;br /&gt;
|SR&lt;br /&gt;
|sampling frequency in Hz&lt;br /&gt;
|-&lt;br /&gt;
|DF&lt;br /&gt;
|frequency resolution in Hz&lt;br /&gt;
|-&lt;br /&gt;
|FB, LB&lt;br /&gt;
|first and last frequency bin of wavelet analysis&lt;br /&gt;
|-&lt;br /&gt;
|F0, O, ACUT&lt;br /&gt;
|wavelet parameters (see function description)&lt;br /&gt;
|-&lt;br /&gt;
|TYP&lt;br /&gt;
|wavelet typ&lt;br /&gt;
|-&lt;br /&gt;
|FMT&lt;br /&gt;
|output format&lt;br /&gt;
|-&lt;br /&gt;
|SP, MAMI,MAMX, MPV&lt;br /&gt;
|phase locking and masking parameters; see atom SPECTRUM&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=====Outputs:=====&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;WR, WI&amp;lt;/var&amp;gt;&lt;br /&gt;
|wavelet spectrum output; depends on FMT&lt;br /&gt;
|-&lt;br /&gt;
|FR&lt;br /&gt;
|vector of center frequencies&lt;br /&gt;
|-&lt;br /&gt;
|BW&lt;br /&gt;
|vector or bandwidth frequencies&lt;br /&gt;
|-&lt;br /&gt;
|TW&lt;br /&gt;
|vector of timewidth values&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=====Function:=====&lt;br /&gt;
&lt;br /&gt;
This module computes a wavelet analysis using different types of wavelets. In S_TOOLS&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;STx a scaled wavelet transformation with a bounded integration interval is used:&lt;br /&gt;
&lt;br /&gt;
[[File:1251.png]]&lt;br /&gt;
&lt;br /&gt;
with:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|a&lt;br /&gt;
|frequency scaling parameter&lt;br /&gt;
|-&lt;br /&gt;
|b&lt;br /&gt;
|time shift parameter&lt;br /&gt;
|-&lt;br /&gt;
|S(a)&lt;br /&gt;
|amplitude scaling factor&lt;br /&gt;
|-&lt;br /&gt;
|a&lt;br /&gt;
|time window width (input ACUT&lt;br /&gt;
|-&lt;br /&gt;
|f0&lt;br /&gt;
|basic frequency of wavelet function (input F0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The wavelet function W is defined by the inputs TYP (type of wavelet), ACUT (window width), F0 (basic frequency) and O (order). The available wavelet types and the parameters are described later in this section. The time shift parameter b is always set to the center of the input signal, because the frame shifting is performed outside the module (by the signal I/O functions).&lt;br /&gt;
&lt;br /&gt;
The wavelet transform is computed for a set of discrete frequencies fI, which are defined by the inputs DF, FB (first bin) and LB (last bin):&lt;br /&gt;
&lt;br /&gt;
[[File:1252.png]]&lt;br /&gt;
&lt;br /&gt;
with:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|I&lt;br /&gt;
|frequency bin index, FB &amp;lt;= I &amp;lt;= LB&lt;br /&gt;
|-&lt;br /&gt;
|DF&lt;br /&gt;
|frequency resolution in Hz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The scaling factor S(a) is computed for each frequency fI to get the magnitude 1 for a pure sinoid with frequency fI. This scaling is performed to get a &#039;wavelet spectrum&#039; that is comparable to other spectrum analysis/transformation methods.&lt;br /&gt;
&lt;br /&gt;
For each input signal frame X the wavelet transform of all frequency bins fI is computed:&lt;br /&gt;
&lt;br /&gt;
[[File:1253.png]]&lt;br /&gt;
&lt;br /&gt;
with:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|f0&lt;br /&gt;
|basic frequency of wavelet function (see wavelet table below)&lt;br /&gt;
|-&lt;br /&gt;
|aI&lt;br /&gt;
|frequency scaling factor for bin I (= f0/fI)&lt;br /&gt;
|-&lt;br /&gt;
|tA&lt;br /&gt;
|point of analysis, set to the center of the signal vector&lt;br /&gt;
|-&lt;br /&gt;
|wrI, wiI&lt;br /&gt;
|real an imaginary part of H&#039; at bin I;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values wrI and wiI are converted to different formats (see output format table) and stored in the outputs WR and WI. In addition the center frequencies (fI, output FR), the analysis bandwidths (output BW) and time window widths (output TW) of each bin are computed and stored in outputs.&lt;br /&gt;
&lt;br /&gt;
The length of the input signal X (NX) should be equal to (or greater than) the longest time window. If the signal is shorter zero padding on both sides in performed.&lt;br /&gt;
&lt;br /&gt;
[[File:1254.png]]&lt;br /&gt;
&lt;br /&gt;
The input SP, MAMI, MAMX and MPV are used for the phase computation and are processed in the same way as for the atom [[Programmer Guide/SPU Reference/SPECTRUM - fft spectrum|SPECTRUM]]. Phase locking and masking is also described in this section.&lt;br /&gt;
&lt;br /&gt;
Table 15: Wavelet functions (input TYP) and parameters (inputs F0 and O){|&lt;br /&gt;
|-&lt;br /&gt;
|TYP&lt;br /&gt;
|wavelet W(t)&lt;br /&gt;
|F0, O (comments)&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
|Morlet:[[File:1257.png]]&lt;br /&gt;
|f0 = F0&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|Generalized Morlet:[[File:1256.png]]&lt;br /&gt;
|f0 = F0n = O&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|Laplace:[[File:1255.png]]&lt;br /&gt;
|f0 = F0 &lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|n&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;th derivative Gaussian:[[File:1258.png]]&lt;br /&gt;
|n = F0 (integer, &amp;gt;=0)[[File:1259.png]]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Mexican Hat: special case of n&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;th derivative Gaussian with n equals 2&lt;br /&gt;
|f0 = F0&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Goupillaud:[[File:4496.png]]&lt;br /&gt;
|f0 = F0&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Morlet II:[[File:4497.png]]&lt;br /&gt;
|f0 = F0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Table 16: Output formats (selected by input FMT)&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|FMT&lt;br /&gt;
|output WR&lt;br /&gt;
|output WI&lt;br /&gt;
|-&lt;br /&gt;
|0, 10&lt;br /&gt;
|real part: WRI = wrI&lt;br /&gt;
|imaginary part: WII = wiI&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|energy: WRI = aI2&lt;br /&gt;
|phase: WII = jI&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|real part: WRI = wrI&lt;br /&gt;
|all zero: WII = 0&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|imaginary part: WRI = wiI&lt;br /&gt;
|all zero: WII = 0&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|amplitude: WRI = aI&lt;br /&gt;
|all zero: WII = 0&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|phase: WRI = jI&lt;br /&gt;
|all zero: WII = 0&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|energy: WRI = aI2&lt;br /&gt;
|locked phase: WII = j&#039;I&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|amplitude (dB): WRI = 20.log10(aI)&lt;br /&gt;
|phase: WII = jI&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|amplitude (dB): WRI = 20.log10(aI)&lt;br /&gt;
|locked phase: WII = j&#039;I&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|locked phase: WRI = j&#039;I&lt;br /&gt;
|all zero: WII = 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
with:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|I&lt;br /&gt;
|bin index (FB, ..., LB)&lt;br /&gt;
|-&lt;br /&gt;
|wrI, wiI&lt;br /&gt;
|real and imaginary part of the wavelet bin I&lt;br /&gt;
|-&lt;br /&gt;
|aI&lt;br /&gt;
|amplitude of wavelet bin I (aI2 = wrI2 + wiI2)&lt;br /&gt;
|-&lt;br /&gt;
|jI, j&#039;I&lt;br /&gt;
|unlocked/locked phase of wavelet bin I (jI = arctan(wiI/wrI))&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/File/FILE_Item_Attributes&amp;diff=9990</id>
		<title>Programmer Guide/Shell Items/File/FILE Item Attributes</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/File/FILE_Item_Attributes&amp;diff=9990"/>
		<updated>2018-04-10T10:15:04Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Common file item attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{File Item}}&lt;br /&gt;
The following file item attributes can be queried in the format &amp;lt;code&amp;gt;$#fileItem[&amp;lt;var&amp;gt;Attribute&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Common file item attributes ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!Attribute&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Value(s) and Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | full path of the file attached to the respective file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!UNCPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | full path of the file attached to the respective file item in UNC format&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!DRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | the drive letter of the file attached to the respective file item (without a colon) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!DIRECTORY&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | the directory of the file attached to the respective file item (without a trailing backslash)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!UNCDIRECTORY&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | the directory of the file attached to the respective file item (without a trailing backslash) in UNC format&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!NAME&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | the name of file attached to the respective file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!EXTENSION&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | extension part of the filename of the file attached to the respective file item (without a leading &amp;amp;quot;&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;&amp;amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!FILENAME&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | name and extension of the file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!CREATED&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;yyyy.mm.dd hh.mm.ss&amp;lt;/code&amp;gt;&lt;br /&gt;
| creation date and time of file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!MODIFIED&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;yyyy.mm.dd hh.mm.ss&amp;lt;/code&amp;gt;&lt;br /&gt;
| time of last modification of file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!MTSTAMP&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;modmin&amp;lt;/code&amp;gt;&lt;br /&gt;
| time of last modification in minutes since 1st January 1980&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!ATTRIBUTES&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;DIRECTORY&amp;amp;#124;SYSTEM&amp;amp;#124;HIDDEN&amp;amp;#124;NORMAL&amp;lt;/code&amp;gt;&lt;br /&gt;
| type attributes of file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!ACCESS&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;READ&amp;amp;#124;WRITE&amp;amp;#124;APPEND&amp;lt;/code&amp;gt;&lt;br /&gt;
| access attributes of file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!SIZE&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt;&lt;br /&gt;
| size of file attached to the file item in bytes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!TYPE&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;FILE&amp;amp;#124;LIST&amp;amp;#124;TEXT&amp;amp;#124;SECTION&amp;amp;#124;XML&amp;lt;/code&amp;gt;&lt;br /&gt;
| type of file item (set in NEW command)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!SHELL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;owner&amp;lt;/code&amp;gt;&lt;br /&gt;
| shellidid of shell creating the file item (8 hex digits)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!USERS&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;numusers&amp;lt;/code&amp;gt;&lt;br /&gt;
| number of linked items sharing the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!LASTACCESS&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;yyyy.mm.dd hh.mm.ss&amp;lt;/code&amp;gt;&lt;br /&gt;
| date and time of the last access to the file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;!CHANGED&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;a number &amp;gt;= 0&amp;lt;/code&amp;gt;&lt;br /&gt;
| A value of 0 indicates that the file in memory is identical to that on disk. For all files except XML files, a value of 1 indicates that the file has been changed in memory and has not been saved yet. For XML files, the value may be greater than 1, and indicates the number of change operations which have been made since the last time the content was saved to disk.&lt;br /&gt;
|-&lt;br /&gt;
| assigning &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
| You may programmatically set, or reset, the value of the !CHANGED attribute by &#039;&#039;assigning&#039;&#039; &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, to this attribute:&lt;br /&gt;
&lt;br /&gt;
 $#file[!changed] := 1    // set the attribute&lt;br /&gt;
 $#file[!changed] := 0    // reset the attribute&lt;br /&gt;
&lt;br /&gt;
Warning: this functionality changed in version 3.9.0. Previously, setting the attribute using &#039;1&#039; would &#039;&#039;reset&#039;&#039; the attribute, and using the value &#039;0&#039; was unsupported.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Binary file items ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Attribute&lt;br /&gt;
! Value(s)&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;!BININFO&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | number of sections&lt;br /&gt;
| After a &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; command, &amp;lt;code&amp;gt;!BININFO&amp;lt;/code&amp;gt; will return the index of the last  section loaded/saved.&lt;br /&gt;
|-&lt;br /&gt;
| After a &amp;lt;code&amp;gt;LOAD&amp;lt;/code&amp;gt; command &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;1&amp;lt;/code&amp;gt;, if the file is not a binary file, or the last command failed. &amp;lt;!-- ??? C.G.: What does that MEAN? --&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GDX file items ==&lt;br /&gt;
&lt;br /&gt;
The GDX file item supports the following attributes in addition to the general file item attributes.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!Attribute&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Value(s) and Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!DATA&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!DATA&amp;lt;/code&amp;gt; attribute returns data from the GDX file.&lt;br /&gt;
 $#gdx[!DATA] // returns all the data&lt;br /&gt;
 $#gdx[!DATA,index,count] // returns one or more columns&lt;br /&gt;
Here the &amp;lt;code&amp;gt;index&amp;lt;/code&amp;gt; argument determines the first column, and the &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt; argument determines the number of columns to return.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!DATATYPE&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!DATATYPE&amp;lt;/code&amp;gt; attribute returns the data type of this GDX file (See [[Programmer Guide/Shell Items/File/NEW FILE|Creating a GDX file]] for details).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!NCOL&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!NCOL&amp;lt;/code&amp;gt; attribute returns the number of columns.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!NROW&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!NROW&amp;lt;/code&amp;gt; attribute returns the number of rows.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!NWRITTEN&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!NWRITTEN&amp;lt;/code&amp;gt; attribute returns the number of columns which have been written (rather than defined).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== XML file items ==&lt;br /&gt;
&lt;br /&gt;
=== General attributes of XML file items ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
! Attribute&lt;br /&gt;
! Value(s)&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XROOT&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;root_element_nametag&amp;lt;/var&amp;gt;&lt;br /&gt;
| name of the root element&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XPARENT&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;parent_element_nametag&amp;lt;/var&amp;gt;&lt;br /&gt;
| name of the parent element&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XPARENTPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;root_element_name\&amp;amp;hellip;\parent_element_name&amp;lt;/var&amp;gt;&lt;br /&gt;
| full path of the parent element&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XELEMENTS&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;elementcountnumber&amp;lt;/var&amp;gt;&lt;br /&gt;
| of elements on selected element level&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XNODETYPE&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;ELEMENT&amp;amp;#124;COMMENT&amp;amp;#124;PROC&amp;amp;#124;DOCTYPE&amp;lt;/code&amp;gt;&lt;br /&gt;
| type of the selected node&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes of the selected element of an XML file item ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
! Attribute&lt;br /&gt;
! Argument&lt;br /&gt;
! Value(s) and Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | &amp;lt;code&amp;gt;!XALL&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
| a list of all element parts&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt; || element tag name&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;empty&amp;lt;/var&amp;gt; || 1 if element data is empty, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;cdata&amp;lt;/var&amp;gt; || 1 if element data is a CData-section, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;childs&amp;lt;/var&amp;gt; || number of child elements &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;size&amp;lt;/var&amp;gt; || size of data section (characters)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;nattr&amp;lt;/var&amp;gt; || number of attributes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;attr&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;,&amp;amp;hellip; || name of attribute 0, &amp;amp;hellip; (0 to &amp;lt;var&amp;gt;nattr&amp;lt;/var&amp;gt;-1)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XTAG&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|element_tag&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XATTRIBUTES&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|number_of_attributes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XATTRIBUTE&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
|attribute_name name of attribute number &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XATTRIBUTE&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;&lt;br /&gt;
|attribute_value value of attribute named &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XEMPTY&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|returns 1 if element is empty (no data) and 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XCDATA&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|returns 1 if element contains a CData section and 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XCHILDS&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!XCHILDREN&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|returns number of child elements of the selected element&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XSIZE&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|size of data section in characters&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XDATA&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|content of data section&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Document/element type definition attributes of an XML file item ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!Attribute&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;Id&lt;br /&gt;
!Sub&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;Id 1&lt;br /&gt;
!Sub&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;Id 2&lt;br /&gt;
!Value(s) and Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTNAME&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|name of document type definition&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTROOT&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|tag of root element&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTELEMENTS&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|number of defined element types&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTELEMENT&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|definition of element type with specified index or tag; the result is&lt;br /&gt;
&amp;lt;code&amp;gt;tag parent base nobase data with&amp;lt;/code&amp;gt;:&lt;br /&gt;
{|&lt;br /&gt;
! tag !! element tag&lt;br /&gt;
|-&lt;br /&gt;
|parent&lt;br /&gt;
|parent element tag or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|base&lt;br /&gt;
|base element tag or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|nobase&lt;br /&gt;
|nobase element tag or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|data&lt;br /&gt;
|data type name or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTCHILDREN&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|number of children defined for element tag&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTCHILD&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
|cindex or ctag&lt;br /&gt;
|definition of child cindex or ctag of the element tag. The result is:ctag min maxwith:&lt;br /&gt;
{|&lt;br /&gt;
! ctag !! tag of child element&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt;&lt;br /&gt;
|number of minimum occurrences&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt;&lt;br /&gt;
|number of maximum occurrences or &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;1 if not defined&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTATTRIBUTES&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|number of attributes defined for element tag&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XTDATTRIBUTE&amp;lt;/code&amp;gt;&lt;br /&gt;
|tag&lt;br /&gt;
|&amp;lt;var&amp;gt;aindex&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;aname&amp;lt;/var&amp;gt;&lt;br /&gt;
|definition of attribute aindex or aname of element tag. The result is:aname req vis val type paramswith:&lt;br /&gt;
{|&lt;br /&gt;
! aname !! name of attribute&lt;br /&gt;
|-&lt;br /&gt;
|req&lt;br /&gt;
|required flag (0=no, 1=yes)&lt;br /&gt;
|-&lt;br /&gt;
|vis&lt;br /&gt;
|visibility flag (0=hidden, 1=value, 2=name and value)&lt;br /&gt;
|-&lt;br /&gt;
|val&lt;br /&gt;
|default value of * if not set&lt;br /&gt;
|-&lt;br /&gt;
|type&lt;br /&gt;
|attribute value type (&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VALUELIST&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|params&lt;br /&gt;
|parameters, depends on type{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;minval&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;* &amp;lt;var&amp;gt;maxval&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;minval&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;* &amp;lt;var&amp;gt;maxval&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;&lt;br /&gt;
|unique{0&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;1} respect{0&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;1}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;VALUELIST&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;value1 value2 &amp;amp;hellip;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XDTISA&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
| none&lt;br /&gt;
| returns &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if the selected element of the file item is of type &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt; or is derived from &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt; and &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; otherwise&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/File/FILE_Item_Attributes&amp;diff=9989</id>
		<title>Programmer Guide/Shell Items/File/FILE Item Attributes</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/File/FILE_Item_Attributes&amp;diff=9989"/>
		<updated>2018-04-10T10:12:10Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Common file item attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{File Item}}&lt;br /&gt;
The following file item attributes can be queried in the format &amp;lt;code&amp;gt;$#fileItem[&amp;lt;var&amp;gt;Attribute&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Common file item attributes ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!Attribute&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Value(s) and Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | full path of the file attached to the respective file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!DRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | the drive letter of the file attached to the respective file item (without a colon) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!DIRECTORY&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | the directory of the file attached to the respective file item (without a trailing backslash)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!NAME&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | the name of file attached to the respective file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!EXTENSION&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | extension part of the filename of the file attached to the respective file item (without a leading &amp;amp;quot;&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;&amp;amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!FILENAME&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | name and extension of the file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!CREATED&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;yyyy.mm.dd hh.mm.ss&amp;lt;/code&amp;gt;&lt;br /&gt;
| creation date and time of file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!MODIFIED&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;yyyy.mm.dd hh.mm.ss&amp;lt;/code&amp;gt;&lt;br /&gt;
| time of last modification of file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!TIMESTAMP&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;modmin&amp;lt;/code&amp;gt;&lt;br /&gt;
| time of last modification in minutes of since 1st January 1980&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!ATTRIBUTES&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;DIRECTORY&amp;amp;#124;SYSTEM&amp;amp;#124;HIDDEN&amp;amp;#124;NORMAL&amp;lt;/code&amp;gt;&lt;br /&gt;
| type attributes of file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!ACCESS&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;READ&amp;amp;#124;WRITE&amp;amp;#124;APPEND&amp;lt;/code&amp;gt;&lt;br /&gt;
| access attributes of file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!SIZE&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt;&lt;br /&gt;
| size of file attached to the file item in bytes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!TYPE&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;FILE&amp;amp;#124;LIST&amp;amp;#124;TEXT&amp;amp;#124;SECTION&amp;amp;#124;XML&amp;lt;/code&amp;gt;&lt;br /&gt;
| type of file item (set in NEW command)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!SHELL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;owner&amp;lt;/code&amp;gt;&lt;br /&gt;
| shellidid of shell creating the file item (8 hex digits)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!USERS&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;numusers&amp;lt;/code&amp;gt;&lt;br /&gt;
| number of linked items sharing the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!LASTACCESS&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;yyyy.mm.dd hh.mm.ss&amp;lt;/code&amp;gt;&lt;br /&gt;
| date and time of the last access to the file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;!CHANGED&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;a number &amp;gt;= 0&amp;lt;/code&amp;gt;&lt;br /&gt;
| A value of 0 indicates that the file in memory is identical to that on disk. For all files except XML files, a value of 1 indicates that the file has been changed in memory and has not been saved yet. For XML files, the value may be greater than 1, and indicates the number of change operations which have been made since the last time the content was saved to disk.&lt;br /&gt;
|-&lt;br /&gt;
| assigning &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
| You may programmatically set, or reset, the value of the !CHANGED attribute by &#039;&#039;assigning&#039;&#039; &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, to this attribute:&lt;br /&gt;
&lt;br /&gt;
 $#file[!changed] := 1    // set the attribute&lt;br /&gt;
 $#file[!changed] := 0    // reset the attribute&lt;br /&gt;
&lt;br /&gt;
Warning: this functionality changed in version 3.9.0. Previously, setting the attribute using &#039;1&#039; would &#039;&#039;reset&#039;&#039; the attribute, and using the value &#039;0&#039; was unsupported.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Binary file items ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Attribute&lt;br /&gt;
! Value(s)&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;!BININFO&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | number of sections&lt;br /&gt;
| After a &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; command, &amp;lt;code&amp;gt;!BININFO&amp;lt;/code&amp;gt; will return the index of the last  section loaded/saved.&lt;br /&gt;
|-&lt;br /&gt;
| After a &amp;lt;code&amp;gt;LOAD&amp;lt;/code&amp;gt; command &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;1&amp;lt;/code&amp;gt;, if the file is not a binary file, or the last command failed. &amp;lt;!-- ??? C.G.: What does that MEAN? --&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GDX file items ==&lt;br /&gt;
&lt;br /&gt;
The GDX file item supports the following attributes in addition to the general file item attributes.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!Attribute&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Value(s) and Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!DATA&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!DATA&amp;lt;/code&amp;gt; attribute returns data from the GDX file.&lt;br /&gt;
 $#gdx[!DATA] // returns all the data&lt;br /&gt;
 $#gdx[!DATA,index,count] // returns one or more columns&lt;br /&gt;
Here the &amp;lt;code&amp;gt;index&amp;lt;/code&amp;gt; argument determines the first column, and the &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt; argument determines the number of columns to return.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!DATATYPE&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!DATATYPE&amp;lt;/code&amp;gt; attribute returns the data type of this GDX file (See [[Programmer Guide/Shell Items/File/NEW FILE|Creating a GDX file]] for details).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!NCOL&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!NCOL&amp;lt;/code&amp;gt; attribute returns the number of columns.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!NROW&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!NROW&amp;lt;/code&amp;gt; attribute returns the number of rows.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!NWRITTEN&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!NWRITTEN&amp;lt;/code&amp;gt; attribute returns the number of columns which have been written (rather than defined).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== XML file items ==&lt;br /&gt;
&lt;br /&gt;
=== General attributes of XML file items ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
! Attribute&lt;br /&gt;
! Value(s)&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XROOT&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;root_element_nametag&amp;lt;/var&amp;gt;&lt;br /&gt;
| name of the root element&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XPARENT&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;parent_element_nametag&amp;lt;/var&amp;gt;&lt;br /&gt;
| name of the parent element&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XPARENTPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;root_element_name\&amp;amp;hellip;\parent_element_name&amp;lt;/var&amp;gt;&lt;br /&gt;
| full path of the parent element&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XELEMENTS&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;elementcountnumber&amp;lt;/var&amp;gt;&lt;br /&gt;
| of elements on selected element level&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XNODETYPE&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;ELEMENT&amp;amp;#124;COMMENT&amp;amp;#124;PROC&amp;amp;#124;DOCTYPE&amp;lt;/code&amp;gt;&lt;br /&gt;
| type of the selected node&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes of the selected element of an XML file item ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
! Attribute&lt;br /&gt;
! Argument&lt;br /&gt;
! Value(s) and Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | &amp;lt;code&amp;gt;!XALL&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
| a list of all element parts&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt; || element tag name&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;empty&amp;lt;/var&amp;gt; || 1 if element data is empty, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;cdata&amp;lt;/var&amp;gt; || 1 if element data is a CData-section, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;childs&amp;lt;/var&amp;gt; || number of child elements &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;size&amp;lt;/var&amp;gt; || size of data section (characters)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;nattr&amp;lt;/var&amp;gt; || number of attributes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;attr&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;,&amp;amp;hellip; || name of attribute 0, &amp;amp;hellip; (0 to &amp;lt;var&amp;gt;nattr&amp;lt;/var&amp;gt;-1)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XTAG&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|element_tag&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XATTRIBUTES&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|number_of_attributes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XATTRIBUTE&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
|attribute_name name of attribute number &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XATTRIBUTE&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;&lt;br /&gt;
|attribute_value value of attribute named &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XEMPTY&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|returns 1 if element is empty (no data) and 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XCDATA&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|returns 1 if element contains a CData section and 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XCHILDS&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!XCHILDREN&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|returns number of child elements of the selected element&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XSIZE&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|size of data section in characters&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XDATA&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|content of data section&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Document/element type definition attributes of an XML file item ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!Attribute&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;Id&lt;br /&gt;
!Sub&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;Id 1&lt;br /&gt;
!Sub&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;Id 2&lt;br /&gt;
!Value(s) and Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTNAME&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|name of document type definition&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTROOT&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|tag of root element&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTELEMENTS&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|number of defined element types&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTELEMENT&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|definition of element type with specified index or tag; the result is&lt;br /&gt;
&amp;lt;code&amp;gt;tag parent base nobase data with&amp;lt;/code&amp;gt;:&lt;br /&gt;
{|&lt;br /&gt;
! tag !! element tag&lt;br /&gt;
|-&lt;br /&gt;
|parent&lt;br /&gt;
|parent element tag or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|base&lt;br /&gt;
|base element tag or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|nobase&lt;br /&gt;
|nobase element tag or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|data&lt;br /&gt;
|data type name or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTCHILDREN&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|number of children defined for element tag&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTCHILD&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
|cindex or ctag&lt;br /&gt;
|definition of child cindex or ctag of the element tag. The result is:ctag min maxwith:&lt;br /&gt;
{|&lt;br /&gt;
! ctag !! tag of child element&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt;&lt;br /&gt;
|number of minimum occurrences&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt;&lt;br /&gt;
|number of maximum occurrences or &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;1 if not defined&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTATTRIBUTES&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|number of attributes defined for element tag&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XTDATTRIBUTE&amp;lt;/code&amp;gt;&lt;br /&gt;
|tag&lt;br /&gt;
|&amp;lt;var&amp;gt;aindex&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;aname&amp;lt;/var&amp;gt;&lt;br /&gt;
|definition of attribute aindex or aname of element tag. The result is:aname req vis val type paramswith:&lt;br /&gt;
{|&lt;br /&gt;
! aname !! name of attribute&lt;br /&gt;
|-&lt;br /&gt;
|req&lt;br /&gt;
|required flag (0=no, 1=yes)&lt;br /&gt;
|-&lt;br /&gt;
|vis&lt;br /&gt;
|visibility flag (0=hidden, 1=value, 2=name and value)&lt;br /&gt;
|-&lt;br /&gt;
|val&lt;br /&gt;
|default value of * if not set&lt;br /&gt;
|-&lt;br /&gt;
|type&lt;br /&gt;
|attribute value type (&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VALUELIST&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|params&lt;br /&gt;
|parameters, depends on type{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;minval&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;* &amp;lt;var&amp;gt;maxval&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;minval&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;* &amp;lt;var&amp;gt;maxval&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;&lt;br /&gt;
|unique{0&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;1} respect{0&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;1}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;VALUELIST&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;value1 value2 &amp;amp;hellip;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XDTISA&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
| none&lt;br /&gt;
| returns &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if the selected element of the file item is of type &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt; or is derived from &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt; and &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; otherwise&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/File/FILE_Item_Attributes&amp;diff=9981</id>
		<title>Programmer Guide/Shell Items/File/FILE Item Attributes</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/File/FILE_Item_Attributes&amp;diff=9981"/>
		<updated>2018-04-06T07:28:36Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* Common file item attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{File Item}}&lt;br /&gt;
The following file item attributes can be queried in the format &amp;lt;code&amp;gt;$#fileItem[&amp;lt;var&amp;gt;Attribute&amp;lt;/var&amp;gt;]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Common file item attributes ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!Attribute&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Value(s) and Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!PATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | full path of the file attached to the respective file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!DRIVE&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | the drive letter of the file attached to the respective file item (without a colon) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!DIRECTORY&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | the directory of the file attached to the respective file item (without a trailing backslash)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!NAME&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | the name of file attached to the respective file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!EXTENSION&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | extension part of the filename of the file attached to the respective file item (without a leading &amp;amp;quot;&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;&amp;amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!FILENAME&amp;lt;/code&amp;gt;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | name and extension of the file&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!CREATED&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;yyyy.mm.dd hh.mm.ss&amp;lt;/code&amp;gt;&lt;br /&gt;
| creation date and time of file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!MODIFIED&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;yyyy.mm.dd hh.mm.ss&amp;lt;/code&amp;gt;&lt;br /&gt;
| time of last modification of file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!ATTRIBUTES&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;DIRECTORY&amp;amp;#124;SYSTEM&amp;amp;#124;HIDDEN&amp;amp;#124;NORMAL&amp;lt;/code&amp;gt;&lt;br /&gt;
| type attributes of file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!ACCESS&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;READ&amp;amp;#124;WRITE&amp;amp;#124;APPEND&amp;lt;/code&amp;gt;&lt;br /&gt;
| access attributes of file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!SIZE&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;filesize&amp;lt;/code&amp;gt;&lt;br /&gt;
| size of file attached to the file item in bytes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!TYPE&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;FILE&amp;amp;#124;LIST&amp;amp;#124;TEXT&amp;amp;#124;SECTION&amp;amp;#124;XML&amp;lt;/code&amp;gt;&lt;br /&gt;
| type of file item (set in NEW command)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!SHELL&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;owner&amp;lt;/code&amp;gt;&lt;br /&gt;
| shellidid of shell creating the file item (8 hex digits)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!USERS&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;numusers&amp;lt;/code&amp;gt;&lt;br /&gt;
| number of linked items sharing the file item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!LASTACCESS&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;yyyy.mm.dd hh.mm.ss&amp;lt;/code&amp;gt;&lt;br /&gt;
| date and time of the last access to the file attached to the file item&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;!CHANGED&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;a number &amp;gt;= 0&amp;lt;/code&amp;gt;&lt;br /&gt;
| A value of 0 indicates that the file in memory is identical to that on disk. For all files except XML files, a value of 1 indicates that the file has been changed in memory and has not been saved yet. For XML files, the value may be greater than 1, and indicates the number of change operations which have been made since the last time the content was saved to disk.&lt;br /&gt;
|-&lt;br /&gt;
| assigning &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
| You may programmatically set, or reset, the value of the !CHANGED attribute by &#039;&#039;assigning&#039;&#039; &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, to this attribute:&lt;br /&gt;
&lt;br /&gt;
 $#file[!changed] := 1    // set the attribute&lt;br /&gt;
 $#file[!changed] := 0    // reset the attribute&lt;br /&gt;
&lt;br /&gt;
Warning: this functionality changed in version 3.9.0. Previously, setting the attribute using &#039;1&#039; would &#039;&#039;reset&#039;&#039; the attribute, and using the value &#039;0&#039; was unsupported.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Binary file items ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Attribute&lt;br /&gt;
! Value(s)&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | &amp;lt;code&amp;gt;!BININFO&amp;lt;/code&amp;gt;&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | number of sections&lt;br /&gt;
| After a &amp;lt;code&amp;gt;LIST&amp;lt;/code&amp;gt; command, &amp;lt;code&amp;gt;!BININFO&amp;lt;/code&amp;gt; will return the index of the last  section loaded/saved.&lt;br /&gt;
|-&lt;br /&gt;
| After a &amp;lt;code&amp;gt;LOAD&amp;lt;/code&amp;gt; command &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;1&amp;lt;/code&amp;gt;, if the file is not a binary file, or the last command failed. &amp;lt;!-- ??? C.G.: What does that MEAN? --&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GDX file items ==&lt;br /&gt;
&lt;br /&gt;
The GDX file item supports the following attributes in addition to the general file item attributes.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!Attribute&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Value(s) and Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!DATA&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!DATA&amp;lt;/code&amp;gt; attribute returns data from the GDX file.&lt;br /&gt;
 $#gdx[!DATA] // returns all the data&lt;br /&gt;
 $#gdx[!DATA,index,count] // returns one or more columns&lt;br /&gt;
Here the &amp;lt;code&amp;gt;index&amp;lt;/code&amp;gt; argument determines the first column, and the &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt; argument determines the number of columns to return.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!DATATYPE&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!DATATYPE&amp;lt;/code&amp;gt; attribute returns the data type of this GDX file (See [[Programmer Guide/Shell Items/File/NEW FILE|Creating a GDX file]] for details).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!NCOL&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!NCOL&amp;lt;/code&amp;gt; attribute returns the number of columns.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!NROW&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!NROW&amp;lt;/code&amp;gt; attribute returns the number of rows.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!NWRITTEN&amp;lt;/code&amp;gt;&lt;br /&gt;
|The &amp;lt;code&amp;gt;!NWRITTEN&amp;lt;/code&amp;gt; attribute returns the number of columns which have been written (rather than defined).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== XML file items ==&lt;br /&gt;
&lt;br /&gt;
=== General attributes of XML file items ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
! Attribute&lt;br /&gt;
! Value(s)&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XROOT&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;root_element_nametag&amp;lt;/var&amp;gt;&lt;br /&gt;
| name of the root element&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XPARENT&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;parent_element_nametag&amp;lt;/var&amp;gt;&lt;br /&gt;
| name of the parent element&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XPARENTPATH&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;root_element_name\&amp;amp;hellip;\parent_element_name&amp;lt;/var&amp;gt;&lt;br /&gt;
| full path of the parent element&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XELEMENTS&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;elementcountnumber&amp;lt;/var&amp;gt;&lt;br /&gt;
| of elements on selected element level&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XNODETYPE&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;ELEMENT&amp;amp;#124;COMMENT&amp;amp;#124;PROC&amp;amp;#124;DOCTYPE&amp;lt;/code&amp;gt;&lt;br /&gt;
| type of the selected node&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes of the selected element of an XML file item ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
! Attribute&lt;br /&gt;
! Argument&lt;br /&gt;
! Value(s) and Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | &amp;lt;code&amp;gt;!XALL&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
| a list of all element parts&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt; || element tag name&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;empty&amp;lt;/var&amp;gt; || 1 if element data is empty, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;cdata&amp;lt;/var&amp;gt; || 1 if element data is a CData-section, 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;childs&amp;lt;/var&amp;gt; || number of child elements &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;size&amp;lt;/var&amp;gt; || size of data section (characters)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;nattr&amp;lt;/var&amp;gt; || number of attributes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;attr&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;,&amp;amp;hellip; || name of attribute 0, &amp;amp;hellip; (0 to &amp;lt;var&amp;gt;nattr&amp;lt;/var&amp;gt;-1)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XTAG&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|element_tag&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XATTRIBUTES&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|number_of_attributes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XATTRIBUTE&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
|attribute_name name of attribute number &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XATTRIBUTE&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;&lt;br /&gt;
|attribute_value value of attribute named &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XEMPTY&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|returns 1 if element is empty (no data) and 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XCDATA&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|returns 1 if element contains a CData section and 0 otherwise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XCHILDS&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;!XCHILDREN&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|returns number of child elements of the selected element&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XSIZE&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|size of data section in characters&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XDATA&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|content of data section&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Document/element type definition attributes of an XML file item ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!Attribute&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;Id&lt;br /&gt;
!Sub&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;Id 1&lt;br /&gt;
!Sub&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;Id 2&lt;br /&gt;
!Value(s) and Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTNAME&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|name of document type definition&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTROOT&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|tag of root element&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTELEMENTS&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|number of defined element types&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTELEMENT&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|definition of element type with specified index or tag; the result is&lt;br /&gt;
&amp;lt;code&amp;gt;tag parent base nobase data with&amp;lt;/code&amp;gt;:&lt;br /&gt;
{|&lt;br /&gt;
! tag !! element tag&lt;br /&gt;
|-&lt;br /&gt;
|parent&lt;br /&gt;
|parent element tag or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|base&lt;br /&gt;
|base element tag or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|nobase&lt;br /&gt;
|nobase element tag or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|data&lt;br /&gt;
|data type name or &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTCHILDREN&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|number of children defined for element tag&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTCHILD&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
|cindex or ctag&lt;br /&gt;
|definition of child cindex or ctag of the element tag. The result is:ctag min maxwith:&lt;br /&gt;
{|&lt;br /&gt;
! ctag !! tag of child element&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt;&lt;br /&gt;
|number of minimum occurrences&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt;&lt;br /&gt;
|number of maximum occurrences or &amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;1 if not defined&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XDTATTRIBUTES&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|number of attributes defined for element tag&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!XTDATTRIBUTE&amp;lt;/code&amp;gt;&lt;br /&gt;
|tag&lt;br /&gt;
|&amp;lt;var&amp;gt;aindex&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;aname&amp;lt;/var&amp;gt;&lt;br /&gt;
|definition of attribute aindex or aname of element tag. The result is:aname req vis val type paramswith:&lt;br /&gt;
{|&lt;br /&gt;
! aname !! name of attribute&lt;br /&gt;
|-&lt;br /&gt;
|req&lt;br /&gt;
|required flag (0=no, 1=yes)&lt;br /&gt;
|-&lt;br /&gt;
|vis&lt;br /&gt;
|visibility flag (0=hidden, 1=value, 2=name and value)&lt;br /&gt;
|-&lt;br /&gt;
|val&lt;br /&gt;
|default value of * if not set&lt;br /&gt;
|-&lt;br /&gt;
|type&lt;br /&gt;
|attribute value type (&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;VALUELIST&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|params&lt;br /&gt;
|parameters, depends on type{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;minval&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;* &amp;lt;var&amp;gt;maxval&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;minval&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;* &amp;lt;var&amp;gt;maxval&amp;lt;/var&amp;gt;&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;*&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;&lt;br /&gt;
|unique{0&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;1} respect{0&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;1}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;VALUELIST&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;value1 value2 &amp;amp;hellip;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;!XDTISA&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt;&lt;br /&gt;
| none&lt;br /&gt;
| returns &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if the selected element of the file item is of type &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt; or is derived from &amp;lt;var&amp;gt;tag&amp;lt;/var&amp;gt; and &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; otherwise&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/BScript&amp;diff=9938</id>
		<title>Programmer Guide/BScript</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/BScript&amp;diff=9938"/>
		<updated>2018-03-15T09:18:31Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* File I/O Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:BScript - The runtime environment of Scripts}}&lt;br /&gt;
The {{STX}} application implements an environment for the development, debugging and execution of user scripts. It is used by the [[User_Guide/The_Script_Controller|Script Controller]] and the [[User_Guide/STX_Console|Console]] to load a script file and to test, debug or run a macro defined in this file. When the execution of the macro is finished, the script file is unloaded and the runtime environment is deleted.&lt;br /&gt;
&lt;br /&gt;
The term &#039;&#039;script&#039;&#039; is a synonym for an application implemented using one or more [[Programmer_Guide/Introduction#Macros|macros]], [[Programmer_Guide/Introduction#Classes.2C_Instances|classes]] and [[Programmer_Guide/Shell_Items/SPU|SPU]]s. Scripts can be used to implement ...&lt;br /&gt;
* applying standard {{STX}} signal processing to multiple signals&lt;br /&gt;
* signal processing applications (like the {{Stx}} [[User_Guide/Spectrogram_and_Parameter_Viewer|Spectrogram &amp;amp; Parameters Viewer]])&lt;br /&gt;
* complex database operations on the opened {{STx}} project (e.g. using macro [[Programmer_Guide/Macro_Library/DATASETCMD|DataSetCmd]] and classes [[Programmer_Guide/Macro_Library/BDataSet|BDataSet]] and [[Programmer_Guide/Macro_Library/BSTXIni|BSTXIni]]&lt;br /&gt;
* a solution for the Towers of Hanoi problem&lt;br /&gt;
* in fact, everything you see in {{STX}} can be programmed in the scripting language&lt;br /&gt;
* in fact, everything you see in {{Stx}} &#039;&#039;is&#039;&#039; programmed in the scripting language&lt;br /&gt;
&lt;br /&gt;
==Running a Script==&lt;br /&gt;
To run a script use the [[User_Guide/The_Script_Controller|Script Controller]] dialog to select/create a file, select the macro and supply arguments or the [[User_Guide/STX_Console|Console command &amp;lt;code&amp;gt;STS &#039;&#039;file&#039;&#039;::&#039;&#039;macro&#039;&#039; &#039;&#039;arguments&#039;&#039; /Run&amp;lt;/code&amp;gt;. In both cases a new instance of the application &amp;lt;code&amp;gt;BScript&amp;lt;/code&amp;gt; is started and the script file name, the macro name and the supplied arguments are passed to this instance. Before the execution of the script begins, following initialization steps are performed.&lt;br /&gt;
&lt;br /&gt;
* The specified script file is loaded and it is tested, if the specified macro (called &#039;&#039;scriptmain&#039;&#039;) is defined in the loaded file.&lt;br /&gt;
* All source files defined in the section &#039;&#039;[[Programmer_Guide/Source_code#Libraries|Libraries]]&#039;&#039;  of the script file are loaded.&lt;br /&gt;
* The [[#Script environment|script environment]] is initialzed: Some informations about the script are stored in the shell variable space and an instance of the [[Programmer_Guide/Macro_Library/BScript|class BScript]] named CON is created. The member functions of this instance can be used show/hide the console window, to write informations to the console window and for some other purposes. &lt;br /&gt;
* The macro &#039;&#039;scriptmain&#039;&#039; is started. &lt;br /&gt;
** In the debug mode, the [[User_Guide/Debugger|debugger]] window is shown and the &#039;&#039;break mode&#039;&#039; is entered before the execution of &#039;&#039;scriptmain&#039;&#039; begins.&lt;br /&gt;
&lt;br /&gt;
The user application implemented by &#039;&#039;scriptmain&#039;&#039; is active until this macro is finished, than the control is returned to the BScript application, which performs some cleanup steps:&lt;br /&gt;
&lt;br /&gt;
* All shell items (tables, files, instances, spu&#039;s, ...) are deleted in a save way. For instances the destructor member function is called.&lt;br /&gt;
* If the variable &#039;&#039;&#039;AutoCloseSF&#039;&#039;&#039; equals &#039;&#039;&#039;1&#039;&#039;&#039;: All soundfiles opened by the script are closed automatically. &lt;br /&gt;
** Note: To manage (create, open, close and select) soundfiles a script should always use the macro [[Programmer_Guide/Macro_Library/BSF|BSF]] instead of the commands [[Programmer_Guide/Command_Reference/LOAD|LOAD]] and [[Programmer_Guide/Command_Reference/UNLOAD|UNLOAD]].&lt;br /&gt;
&lt;br /&gt;
==Script Environment==&lt;br /&gt;
All variables and items described here are assigned or created, before the script main macro is called.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;These variables &#039;&#039;&#039;must not&#039;&#039;&#039; be changed&amp;lt;/u&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;ScriptDirectory&amp;lt;/code&amp;gt;: the directory of the script file&lt;br /&gt;
;&amp;lt;code&amp;gt;ScriptFilePath&amp;lt;/code&amp;gt;: the full path of the script file &lt;br /&gt;
;&amp;lt;code&amp;gt;ScriptFileName&amp;lt;/code&amp;gt;: the name of the script file; only the name without directory and filetype&lt;br /&gt;
;&amp;lt;code&amp;gt;ScriptMainName&amp;lt;/code&amp;gt;: the name of the script main macro&lt;br /&gt;
;&amp;lt;code&amp;gt;ScriptRevision&amp;lt;/code&amp;gt;: the {{STX}} revision number used to create the script file; this value is undefined, if the script file was not created with the &#039;&#039;&#039;New&#039;&#039;&#039; function of the [[User_Guide/The_Script_Controller|Script Controller]] or the line containing this information was changed or removed&lt;br /&gt;
;&amp;lt;code&amp;gt;STXRevision&amp;lt;/code&amp;gt;: the actual {{STX}} revision number of the running program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;These variables can/should be set by the user script before the script main macro exits&amp;lt;/u&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;AutoCloseSF&amp;lt;/code&amp;gt;: set this variable &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if all sound files opened during the script execution should be closed automatically and to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if not (default: &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;)&lt;br /&gt;
;&amp;lt;code&amp;gt;ShowLogOnExit&amp;lt;/code&amp;gt;: set this variable &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if the console window should be shown when the script ends, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; otherwise (default: &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;). If the console window shown, the user must close it manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Instance items&amp;lt;/u&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;CON&amp;lt;/code&amp;gt; - instance of [[Programmer_Guide/Macro_Library/BScript|class BScript]]: this instance implements the console window and a set of useful utility functions. &lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;&#039;&#039;&#039;$&#039;&#039;&#039;BSTXIni&amp;lt;/code&amp;gt; - instance of [[Programmer_Guide/Macro_Library/BSTXIni|class BSTXIni]]: an interface object to access the workspace data; the name of the instance is stored in the shell variable BSTXIni&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;&#039;&#039;&#039;$&#039;&#039;&#039;BDataSet&amp;lt;/code&amp;gt; - instance of [[Programmer_Guide/Macro_Library/BDataSet|class BDataSet]]: an interface object to access the project data; the name of the instance is stored in the shell variable BDataSet&lt;br /&gt;
&lt;br /&gt;
* The items listed above are deleted automatically when the script application exits.&lt;br /&gt;
* Both instances $BSTXIni and $BDataSet are accessing global data objects which are (or may be) used by other currently running shells. To gurantee a save access to workspace and project data, the data must be locked to the script (shell) before read and/or write operations.&lt;br /&gt;
&lt;br /&gt;
The following example shows a save way to use the project data. The functions used here are also available for the workspace interface instance.&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 if &#039;$($bdataset attach)&#039; == &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt; then // lock the project-data&lt;br /&gt;
     // LOCK failed! Its not possible to access the project-data now!&lt;br /&gt;
     conlog /error &#039;lock project-data failed!&#039; // write error message to the console window&lt;br /&gt;
     // do something else but do not use the project-data!&lt;br /&gt;
     ...&lt;br /&gt;
  else&lt;br /&gt;
     // LOCK succeeded! Now its save to access project-data!&lt;br /&gt;
     // use the $BDataSet instance members to access project-data&lt;br /&gt;
     ...&lt;br /&gt;
     $bdataset detach // unlock project-data, &lt;br /&gt;
                      // this is necessary to make the project-data available to other shells&lt;br /&gt;
  end&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
==Fuctions Implemented by BScript and CON==&lt;br /&gt;
The functions described below are available in the script runtime environment only. They implement some control and output functions for the Console window and some other useful functions. &lt;br /&gt;
:&#039;&#039;&#039;Note&#039;&#039;&#039;: All functions described here, except the [[#Special Functions|special functions]] are also available in the command line of the [[User_Guide/STX_Console|Console]].&lt;br /&gt;
&lt;br /&gt;
===Special Functions===&lt;br /&gt;
The functions listed below are used to prepare and unprepare the script runtime environment and there should be no necessity to use them in your script:&lt;br /&gt;
&lt;br /&gt;
 BSCRIPT LOAD &#039;&#039;filepath&#039;&#039; [ ; &#039;&#039;mainmacro&#039;&#039; ]&lt;br /&gt;
 BSCRIPT UNLOAD&lt;br /&gt;
 BSCRIPT VERSIONCHECK &#039;&#039;filepath&#039;&#039; [ ; &#039;&#039;showmsgbox&#039;&#039; ]&lt;br /&gt;
&lt;br /&gt;
A description of these functions is only available in the source file &amp;lt;code&amp;gt;BScript.stx&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setup Functions===&lt;br /&gt;
&lt;br /&gt;
 BSCRIPT GETSETUPPATH [&#039;&#039;subset&#039;&#039;; &#039;&#039;empty&#039;&#039;]&lt;br /&gt;
 CON getSetupPath [&#039;&#039;set&#039;&#039;; &#039;&#039;empty&#039;&#039;]&lt;br /&gt;
&lt;br /&gt;
Returns the internal reference (iref) of the workspace set containing the script setup elements. This function can be used to save or load script parameters.&lt;br /&gt;
Arguments:&lt;br /&gt;
:&#039;&#039;subset&#039;&#039;: The relative reference to a sub-set of the standard setup-set (see example)&lt;br /&gt;
:&#039;&#039;empty&#039;&#039;: If this argument is set to &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; the selected set or sub-set is emptied (this means all child elements and sets are deleted), otherwise nothing is deleted. This option can be used (carefully) to delete script settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Example 1&#039;&#039;&#039;: load current/default script settings&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
// lock the workspace before you load the current settings from the workspace&lt;br /&gt;
if &#039;$($bstxini attach)&#039; != &#039;&#039; then&lt;br /&gt;
    // lock okay -&amp;gt; try to load settings from standard script-settings path&lt;br /&gt;
    #currSetup := $bstxini loadsetelement &#039;Table; $ScriptMainName; $(con getsetuppath)&#039;&lt;br /&gt;
    // don&#039;t forget to unlock the workspace&lt;br /&gt;
    $bstxini detach&lt;br /&gt;
end&lt;br /&gt;
// check if current settings are loaded&lt;br /&gt;
if &#039;$#currSetup[?]&#039; != table then&lt;br /&gt;
    // load default settings from the section [DefaultSettings] of the script source file&lt;br /&gt;
    // if current settings are not available&lt;br /&gt;
    #currSetup := sectionfile &#039;$ScriptFilePath ; Load * DefaultSettings&#039;&lt;br /&gt;
end&lt;br /&gt;
// Th current/default settings are now stored in the simple table $#currSetup and can&lt;br /&gt;
// be accessed with the READTAB command or another table access method.&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Example 2&#039;&#039;&#039;: save current script settings&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
// lock the workspace before you save the current settings into the workspace&lt;br /&gt;
if &#039;$($bstxini attach)&#039; != &#039;&#039; then&lt;br /&gt;
    // lock okay -&amp;gt; save settings to standard script-settings path&lt;br /&gt;
    $bstxini SaveSetupElement &#039;$#currSetup; 0 ; Table; $ScriptMainName; $(con getsetuppath)&#039;&lt;br /&gt;
    $bstxini detach&lt;br /&gt;
end&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Console Window Functions===&lt;br /&gt;
&lt;br /&gt;
 CON logOpen&lt;br /&gt;
Open the Console window. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON setTitle [&#039;&#039;title&#039;&#039;]&lt;br /&gt;
Set the caption of the Console window to &#039;&#039;title&#039;&#039;. If no caption is specified, the default caption (&amp;lt;code&amp;gt;ScriptFilePath&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScriptMainName&amp;lt;/code&amp;gt;) is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON setWindow &#039;&#039;x y w h&#039;&#039;&lt;br /&gt;
Set the position and size of the Console window.&lt;br /&gt;
:&#039;&#039;x,y&#039;&#039;: The upper left corner position of the window in pixels &lt;br /&gt;
:&#039;&#039;w,h&#039;&#039;: The width and height of the window in pixels. &lt;br /&gt;
For more details see macro [[Programmer_Guide/Macro_Library/SETWINDOWPOS|SetWindowPos]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON log [&#039;&#039;textline&#039;&#039;]&lt;br /&gt;
 CON logText [&#039;&#039;textline&#039;&#039;]&lt;br /&gt;
Write one &#039;&#039;textline&#039;&#039; to the Console window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON logExt [&#039;&#039;mode&#039;&#039;=overwrite ; text]&lt;br /&gt;
Extended Console window log-function. The argument &#039;&#039;mode&#039;&#039; can be set to &#039;&#039;&#039;overwrite&#039;&#039;&#039;, to overwrite the last line with &#039;&#039;text&#039;&#039;, or to &#039;&#039;&#039;append&#039;&#039;&#039;, to append &#039;&#039;text&#039;&#039; to the last line. This function is e.g. useful to show the progress of a (longer lasting) script process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON eLog &#039;&#039;level&#039;&#039; ; [&#039;&#039;result&#039;&#039;] ; &#039;&#039;textline&#039;&#039;&lt;br /&gt;
Write the error|exit message &#039;&#039;textline&#039;&#039; to the Console window and execute the return command [[Programmer_Guide/Command_Reference/EXIT|&amp;lt;code&amp;gt;EXIT &#039;&#039;level&#039;&#039; SET &amp;lt;nowiki&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&#039;&#039;result&#039;&#039;&amp;lt;nowiki&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;]]. This function is a simple way, to show a text message when returning from a macro.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 con elog 2; 1; the return value of &amp;quot;$#mac&amp;quot; is &amp;quot;1&amp;quot; // show the message and return 1 to the caller of &#039;&#039;&#039;$#mac&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON cls&lt;br /&gt;
 CON logClear&lt;br /&gt;
Clear the Console window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON logClose&lt;br /&gt;
Close the Console window.&lt;br /&gt;
&lt;br /&gt;
===File I/O Functions===&lt;br /&gt;
&lt;br /&gt;
 CON loadData &#039;&#039;textmode&#039;&#039;; &#039;&#039;filepath&#039;&#039; [; &#039;&#039;colsep&#039;&#039;=blank; &#039;&#039;header&#039;&#039;=0; &#039;&#039;skiplines&#039;&#039;=0; &#039;&#039;loadlines&#039;&#039;=*]&lt;br /&gt;
This function loads numerical data tables or string data tables from the specified text file &#039;&#039;filepath&#039;&#039;. The result of the function is a [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Parameter_Table|parameter table item]] or an [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Extended_Table|extended table]] containing the loaded data or an empty string if the function failes.&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;textmode&#039;&#039;&amp;lt;/code&amp;gt;: &lt;br /&gt;
::* &#039;&#039;&#039;text&#039;&#039;&#039; for numerical text files; use &#039;&#039;&#039;textcontinuation&#039;&#039;&#039; if the text file may contain [[Programmer_Guide/Source_code#Escape_and_Continuation_Character|continuation lines]]&lt;br /&gt;
::* &#039;&#039;&#039;string&#039;&#039;&#039; for normal text files; &#039;&#039;&#039;stringcontinuation&#039;&#039;&#039; if the text file may contain [[Programmer_Guide/Source_code#Escape_and_Continuation_Character|continuation lines]]&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;filepath&#039;&#039;&amp;lt;/code&amp;gt;: the path of the file containing the data to be loaded&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;colsep&#039;&#039;&amp;lt;/code&amp;gt;: the column seperator: &#039;&#039;&#039;blank&#039;&#039;&#039;, &#039;&#039;&#039;tab&#039;&#039;&#039;, &#039;&#039;&#039;comma&#039;&#039;&#039; or &#039;&#039;&#039;semicolon&#039;&#039;&#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;header&#039;&#039;&amp;lt;/code&amp;gt;: If set to &#039;&#039;&#039;yes&#039;&#039;&#039; (or &#039;&#039;&#039;1&#039;&#039;&#039;), the first line of the file is interpreted as header-line, and the value of each header column is used as name for the corresponding table field. Otherwise, no header-line is assumed and the table fields are not named.&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;skiplines&#039;&#039;&amp;lt;/code&amp;gt;: number of file lines to be skipped (not stored in the table)&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;loadlines&#039;&#039;&amp;lt;/code&amp;gt;: number of file lines to be loaded; use the character &#039;&#039;&#039;*&#039;&#039;&#039; (=default) to load the whole file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON loadData &#039;&#039;&#039;binary&#039;&#039;&#039;; &#039;&#039;filepath&#039;&#039; [; &#039;&#039;combine&#039;&#039;=0; &#039;&#039;sec1&#039;&#039; [&#039;&#039;mv1&#039;&#039;]; ...]&lt;br /&gt;
Load the specified sections (&#039;&#039;sec1&#039;&#039;, ..) of the [[Programmer_Guide/Shell_Items/File/Introducing_File_Items#Binary_Files|binary file]] &#039;&#039;filepath&#039;&#039;. If &#039;&#039;combine&#039;&#039; is set to &#039;&#039;&#039;yes&#039;&#039;&#039; (or &#039;&#039;&#039;1&#039;&#039;&#039;) the loaded data are combined into one parameter table, otherwise for each section one parameter table is used. The result of this function is a blank seperated list of parameter table items (&#039;&#039;combine&#039;&#039;=0), one parametr table item (&#039;&#039;combine&#039;&#039;=1 or only one section was specified) or an empty sting if the function failes. The missing value (mv1, ..) parameter, which can be specified for each section separately, is only necessary if multiple sections are combined into one table. In this the missing value parameters are passed to the function [[Programmer_Guide/Command_Reference/EVAL/interp|eval interp()], which is used to allign all data to the same length.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON saveData &#039;&#039;&#039;text&#039;&#039;&#039;|&#039;&#039;&#039;ascii&#039;&#039;&#039;; &#039;&#039;table&#039;&#039;; &#039;&#039;filepath&#039;&#039; [; &#039;&#039;header&#039;&#039;=0; &#039;&#039;colsep&#039;&#039;=blank; &#039;&#039;decsym&#039;&#039;=DOT; &#039;&#039;floatfmt&#039;&#039;=%g;  &#039;&#039;intfmt&#039;&#039;=%g]&lt;br /&gt;
Save the parameter or extended table &#039;&#039;table&#039;&#039; into the text file &#039;&#039;filepath&#039;&#039;.  &lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;header&#039;&#039;&amp;lt;/code&amp;gt;: If set to &#039;&#039;&#039;yes&#039;&#039;&#039; (or &#039;&#039;&#039;1&#039;&#039;&#039;), field names of the table are stored in the first line of the text file. Otherwise, no header-line is stored in the file.&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;colsep&#039;&#039;&amp;lt;/code&amp;gt;: the column seperator: &#039;&#039;&#039;blank&#039;&#039;&#039;, &#039;&#039;&#039;tab&#039;&#039;&#039;, &#039;&#039;&#039;comma&#039;&#039;&#039; or &#039;&#039;&#039;semicolon&#039;&#039;&#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;decsym&#039;&#039;&amp;lt;/code&amp;gt;: the decimal symbol to be used for floating point numbers: &#039;&#039;&#039;dot&#039;&#039;&#039; or &#039;&#039;&#039;comma&#039;&#039;&#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;floatfmt&#039;&#039;&amp;lt;/code&amp;gt;: the format of floating point numbers; any valid float/double C-format string (e.g.: %g, %.2f, ...)&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;intfmt&#039;&#039;&amp;lt;/code&amp;gt;: the format of integer numbers; any valid float/double C-format string (e.g.: %.0f, ...)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON saveData &#039;&#039;&#039;text&#039;&#039;&#039;|&#039;&#039;&#039;ascii&#039;&#039;&#039;; &#039;&#039;table&#039;&#039;; CLIPBOARD [; &#039;&#039;header&#039;&#039;=0; &#039;&#039;colsep&#039;&#039;=blank; &#039;&#039;decsym&#039;&#039;=DOT; &#039;&#039;floatfmt&#039;&#039;=%g;  &#039;&#039;intfmt&#039;&#039;=%g; &#039;&#039;fieldlist&#039;&#039;]&lt;br /&gt;
Copy the parameter or extended table &#039;&#039;table&#039;&#039; to the clipboard. All arguments have the same meaning as for the file output. In the extra argument &#039;&#039;fieldlist&#039;&#039; a blank seperated list of table field-ids which should be copied ca be specified. If this argument is not supplied, all fields are copied.&lt;br /&gt;
&lt;br /&gt;
For example, the command &amp;lt;code&amp;gt;con savedata text; &#039;&#039;datatable&#039;&#039;; clipboard; yes; semicolon; comma&amp;lt;/code&amp;gt; can be used to copy the &#039;&#039;datatable&#039;&#039; to the clipboard, from where it can be pasted into a spreadsheet application. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 CON saveDataDlg &#039;&#039;table&#039;&#039; [; &#039;&#039;trans&#039;&#039;=no; &#039;&#039;title&#039;&#039;=Save Table; &#039;&#039;colsep&#039;&#039;=blank; &#039;&#039;decsym&#039;&#039;=dot; &#039;&#039;header&#039;&#039;=no; &#039;&#039;floatfmt&#039;&#039;=%g; &#039;&#039;intfmt&#039;&#039;=%d]&lt;br /&gt;
This function displays a dialog where the arguments of the &amp;lt;code&amp;gt;saveData&amp;lt;/code&amp;gt; functions can be entered.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/BScript&amp;diff=9937</id>
		<title>Programmer Guide/BScript</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/BScript&amp;diff=9937"/>
		<updated>2018-03-15T09:16:36Z</updated>

		<summary type="html">&lt;p&gt;Toni: /* File I/O Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:BScript - The runtime environment of Scripts}}&lt;br /&gt;
The {{STX}} application implements an environment for the development, debugging and execution of user scripts. It is used by the [[User_Guide/The_Script_Controller|Script Controller]] and the [[User_Guide/STX_Console|Console]] to load a script file and to test, debug or run a macro defined in this file. When the execution of the macro is finished, the script file is unloaded and the runtime environment is deleted.&lt;br /&gt;
&lt;br /&gt;
The term &#039;&#039;script&#039;&#039; is a synonym for an application implemented using one or more [[Programmer_Guide/Introduction#Macros|macros]], [[Programmer_Guide/Introduction#Classes.2C_Instances|classes]] and [[Programmer_Guide/Shell_Items/SPU|SPU]]s. Scripts can be used to implement ...&lt;br /&gt;
* applying standard {{STX}} signal processing to multiple signals&lt;br /&gt;
* signal processing applications (like the {{Stx}} [[User_Guide/Spectrogram_and_Parameter_Viewer|Spectrogram &amp;amp; Parameters Viewer]])&lt;br /&gt;
* complex database operations on the opened {{STx}} project (e.g. using macro [[Programmer_Guide/Macro_Library/DATASETCMD|DataSetCmd]] and classes [[Programmer_Guide/Macro_Library/BDataSet|BDataSet]] and [[Programmer_Guide/Macro_Library/BSTXIni|BSTXIni]]&lt;br /&gt;
* a solution for the Towers of Hanoi problem&lt;br /&gt;
* in fact, everything you see in {{STX}} can be programmed in the scripting language&lt;br /&gt;
* in fact, everything you see in {{Stx}} &#039;&#039;is&#039;&#039; programmed in the scripting language&lt;br /&gt;
&lt;br /&gt;
==Running a Script==&lt;br /&gt;
To run a script use the [[User_Guide/The_Script_Controller|Script Controller]] dialog to select/create a file, select the macro and supply arguments or the [[User_Guide/STX_Console|Console command &amp;lt;code&amp;gt;STS &#039;&#039;file&#039;&#039;::&#039;&#039;macro&#039;&#039; &#039;&#039;arguments&#039;&#039; /Run&amp;lt;/code&amp;gt;. In both cases a new instance of the application &amp;lt;code&amp;gt;BScript&amp;lt;/code&amp;gt; is started and the script file name, the macro name and the supplied arguments are passed to this instance. Before the execution of the script begins, following initialization steps are performed.&lt;br /&gt;
&lt;br /&gt;
* The specified script file is loaded and it is tested, if the specified macro (called &#039;&#039;scriptmain&#039;&#039;) is defined in the loaded file.&lt;br /&gt;
* All source files defined in the section &#039;&#039;[[Programmer_Guide/Source_code#Libraries|Libraries]]&#039;&#039;  of the script file are loaded.&lt;br /&gt;
* The [[#Script environment|script environment]] is initialzed: Some informations about the script are stored in the shell variable space and an instance of the [[Programmer_Guide/Macro_Library/BScript|class BScript]] named CON is created. The member functions of this instance can be used show/hide the console window, to write informations to the console window and for some other purposes. &lt;br /&gt;
* The macro &#039;&#039;scriptmain&#039;&#039; is started. &lt;br /&gt;
** In the debug mode, the [[User_Guide/Debugger|debugger]] window is shown and the &#039;&#039;break mode&#039;&#039; is entered before the execution of &#039;&#039;scriptmain&#039;&#039; begins.&lt;br /&gt;
&lt;br /&gt;
The user application implemented by &#039;&#039;scriptmain&#039;&#039; is active until this macro is finished, than the control is returned to the BScript application, which performs some cleanup steps:&lt;br /&gt;
&lt;br /&gt;
* All shell items (tables, files, instances, spu&#039;s, ...) are deleted in a save way. For instances the destructor member function is called.&lt;br /&gt;
* If the variable &#039;&#039;&#039;AutoCloseSF&#039;&#039;&#039; equals &#039;&#039;&#039;1&#039;&#039;&#039;: All soundfiles opened by the script are closed automatically. &lt;br /&gt;
** Note: To manage (create, open, close and select) soundfiles a script should always use the macro [[Programmer_Guide/Macro_Library/BSF|BSF]] instead of the commands [[Programmer_Guide/Command_Reference/LOAD|LOAD]] and [[Programmer_Guide/Command_Reference/UNLOAD|UNLOAD]].&lt;br /&gt;
&lt;br /&gt;
==Script Environment==&lt;br /&gt;
All variables and items described here are assigned or created, before the script main macro is called.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;These variables &#039;&#039;&#039;must not&#039;&#039;&#039; be changed&amp;lt;/u&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;ScriptDirectory&amp;lt;/code&amp;gt;: the directory of the script file&lt;br /&gt;
;&amp;lt;code&amp;gt;ScriptFilePath&amp;lt;/code&amp;gt;: the full path of the script file &lt;br /&gt;
;&amp;lt;code&amp;gt;ScriptFileName&amp;lt;/code&amp;gt;: the name of the script file; only the name without directory and filetype&lt;br /&gt;
;&amp;lt;code&amp;gt;ScriptMainName&amp;lt;/code&amp;gt;: the name of the script main macro&lt;br /&gt;
;&amp;lt;code&amp;gt;ScriptRevision&amp;lt;/code&amp;gt;: the {{STX}} revision number used to create the script file; this value is undefined, if the script file was not created with the &#039;&#039;&#039;New&#039;&#039;&#039; function of the [[User_Guide/The_Script_Controller|Script Controller]] or the line containing this information was changed or removed&lt;br /&gt;
;&amp;lt;code&amp;gt;STXRevision&amp;lt;/code&amp;gt;: the actual {{STX}} revision number of the running program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;These variables can/should be set by the user script before the script main macro exits&amp;lt;/u&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;AutoCloseSF&amp;lt;/code&amp;gt;: set this variable &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if all sound files opened during the script execution should be closed automatically and to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if not (default: &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;)&lt;br /&gt;
;&amp;lt;code&amp;gt;ShowLogOnExit&amp;lt;/code&amp;gt;: set this variable &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if the console window should be shown when the script ends, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; otherwise (default: &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;). If the console window shown, the user must close it manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Instance items&amp;lt;/u&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;CON&amp;lt;/code&amp;gt; - instance of [[Programmer_Guide/Macro_Library/BScript|class BScript]]: this instance implements the console window and a set of useful utility functions. &lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;&#039;&#039;&#039;$&#039;&#039;&#039;BSTXIni&amp;lt;/code&amp;gt; - instance of [[Programmer_Guide/Macro_Library/BSTXIni|class BSTXIni]]: an interface object to access the workspace data; the name of the instance is stored in the shell variable BSTXIni&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;&#039;&#039;&#039;$&#039;&#039;&#039;BDataSet&amp;lt;/code&amp;gt; - instance of [[Programmer_Guide/Macro_Library/BDataSet|class BDataSet]]: an interface object to access the project data; the name of the instance is stored in the shell variable BDataSet&lt;br /&gt;
&lt;br /&gt;
* The items listed above are deleted automatically when the script application exits.&lt;br /&gt;
* Both instances $BSTXIni and $BDataSet are accessing global data objects which are (or may be) used by other currently running shells. To gurantee a save access to workspace and project data, the data must be locked to the script (shell) before read and/or write operations.&lt;br /&gt;
&lt;br /&gt;
The following example shows a save way to use the project data. The functions used here are also available for the workspace interface instance.&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
 if &#039;$($bdataset attach)&#039; == &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt; then // lock the project-data&lt;br /&gt;
     // LOCK failed! Its not possible to access the project-data now!&lt;br /&gt;
     conlog /error &#039;lock project-data failed!&#039; // write error message to the console window&lt;br /&gt;
     // do something else but do not use the project-data!&lt;br /&gt;
     ...&lt;br /&gt;
  else&lt;br /&gt;
     // LOCK succeeded! Now its save to access project-data!&lt;br /&gt;
     // use the $BDataSet instance members to access project-data&lt;br /&gt;
     ...&lt;br /&gt;
     $bdataset detach // unlock project-data, &lt;br /&gt;
                      // this is necessary to make the project-data available to other shells&lt;br /&gt;
  end&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
==Fuctions Implemented by BScript and CON==&lt;br /&gt;
The functions described below are available in the script runtime environment only. They implement some control and output functions for the Console window and some other useful functions. &lt;br /&gt;
:&#039;&#039;&#039;Note&#039;&#039;&#039;: All functions described here, except the [[#Special Functions|special functions]] are also available in the command line of the [[User_Guide/STX_Console|Console]].&lt;br /&gt;
&lt;br /&gt;
===Special Functions===&lt;br /&gt;
The functions listed below are used to prepare and unprepare the script runtime environment and there should be no necessity to use them in your script:&lt;br /&gt;
&lt;br /&gt;
 BSCRIPT LOAD &#039;&#039;filepath&#039;&#039; [ ; &#039;&#039;mainmacro&#039;&#039; ]&lt;br /&gt;
 BSCRIPT UNLOAD&lt;br /&gt;
 BSCRIPT VERSIONCHECK &#039;&#039;filepath&#039;&#039; [ ; &#039;&#039;showmsgbox&#039;&#039; ]&lt;br /&gt;
&lt;br /&gt;
A description of these functions is only available in the source file &amp;lt;code&amp;gt;BScript.stx&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setup Functions===&lt;br /&gt;
&lt;br /&gt;
 BSCRIPT GETSETUPPATH [&#039;&#039;subset&#039;&#039;; &#039;&#039;empty&#039;&#039;]&lt;br /&gt;
 CON getSetupPath [&#039;&#039;set&#039;&#039;; &#039;&#039;empty&#039;&#039;]&lt;br /&gt;
&lt;br /&gt;
Returns the internal reference (iref) of the workspace set containing the script setup elements. This function can be used to save or load script parameters.&lt;br /&gt;
Arguments:&lt;br /&gt;
:&#039;&#039;subset&#039;&#039;: The relative reference to a sub-set of the standard setup-set (see example)&lt;br /&gt;
:&#039;&#039;empty&#039;&#039;: If this argument is set to &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; the selected set or sub-set is emptied (this means all child elements and sets are deleted), otherwise nothing is deleted. This option can be used (carefully) to delete script settings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Example 1&#039;&#039;&#039;: load current/default script settings&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
// lock the workspace before you load the current settings from the workspace&lt;br /&gt;
if &#039;$($bstxini attach)&#039; != &#039;&#039; then&lt;br /&gt;
    // lock okay -&amp;gt; try to load settings from standard script-settings path&lt;br /&gt;
    #currSetup := $bstxini loadsetelement &#039;Table; $ScriptMainName; $(con getsetuppath)&#039;&lt;br /&gt;
    // don&#039;t forget to unlock the workspace&lt;br /&gt;
    $bstxini detach&lt;br /&gt;
end&lt;br /&gt;
// check if current settings are loaded&lt;br /&gt;
if &#039;$#currSetup[?]&#039; != table then&lt;br /&gt;
    // load default settings from the section [DefaultSettings] of the script source file&lt;br /&gt;
    // if current settings are not available&lt;br /&gt;
    #currSetup := sectionfile &#039;$ScriptFilePath ; Load * DefaultSettings&#039;&lt;br /&gt;
end&lt;br /&gt;
// Th current/default settings are now stored in the simple table $#currSetup and can&lt;br /&gt;
// be accessed with the READTAB command or another table access method.&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;&#039;Example 2&#039;&#039;&#039;: save current script settings&amp;lt;/u&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
// lock the workspace before you save the current settings into the workspace&lt;br /&gt;
if &#039;$($bstxini attach)&#039; != &#039;&#039; then&lt;br /&gt;
    // lock okay -&amp;gt; save settings to standard script-settings path&lt;br /&gt;
    $bstxini SaveSetupElement &#039;$#currSetup; 0 ; Table; $ScriptMainName; $(con getsetuppath)&#039;&lt;br /&gt;
    $bstxini detach&lt;br /&gt;
end&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Console Window Functions===&lt;br /&gt;
&lt;br /&gt;
 CON logOpen&lt;br /&gt;
Open the Console window. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON setTitle [&#039;&#039;title&#039;&#039;]&lt;br /&gt;
Set the caption of the Console window to &#039;&#039;title&#039;&#039;. If no caption is specified, the default caption (&amp;lt;code&amp;gt;ScriptFilePath&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScriptMainName&amp;lt;/code&amp;gt;) is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON setWindow &#039;&#039;x y w h&#039;&#039;&lt;br /&gt;
Set the position and size of the Console window.&lt;br /&gt;
:&#039;&#039;x,y&#039;&#039;: The upper left corner position of the window in pixels &lt;br /&gt;
:&#039;&#039;w,h&#039;&#039;: The width and height of the window in pixels. &lt;br /&gt;
For more details see macro [[Programmer_Guide/Macro_Library/SETWINDOWPOS|SetWindowPos]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON log [&#039;&#039;textline&#039;&#039;]&lt;br /&gt;
 CON logText [&#039;&#039;textline&#039;&#039;]&lt;br /&gt;
Write one &#039;&#039;textline&#039;&#039; to the Console window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON logExt [&#039;&#039;mode&#039;&#039;=overwrite ; text]&lt;br /&gt;
Extended Console window log-function. The argument &#039;&#039;mode&#039;&#039; can be set to &#039;&#039;&#039;overwrite&#039;&#039;&#039;, to overwrite the last line with &#039;&#039;text&#039;&#039;, or to &#039;&#039;&#039;append&#039;&#039;&#039;, to append &#039;&#039;text&#039;&#039; to the last line. This function is e.g. useful to show the progress of a (longer lasting) script process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON eLog &#039;&#039;level&#039;&#039; ; [&#039;&#039;result&#039;&#039;] ; &#039;&#039;textline&#039;&#039;&lt;br /&gt;
Write the error|exit message &#039;&#039;textline&#039;&#039; to the Console window and execute the return command [[Programmer_Guide/Command_Reference/EXIT|&amp;lt;code&amp;gt;EXIT &#039;&#039;level&#039;&#039; SET &amp;lt;nowiki&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&#039;&#039;result&#039;&#039;&amp;lt;nowiki&amp;gt;&#039;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;]]. This function is a simple way, to show a text message when returning from a macro.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 con elog 2; 1; the return value of &amp;quot;$#mac&amp;quot; is &amp;quot;1&amp;quot; // show the message and return 1 to the caller of &#039;&#039;&#039;$#mac&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON cls&lt;br /&gt;
 CON logClear&lt;br /&gt;
Clear the Console window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON logClose&lt;br /&gt;
Close the Console window.&lt;br /&gt;
&lt;br /&gt;
===File I/O Functions===&lt;br /&gt;
&lt;br /&gt;
 CON loadData &#039;&#039;textmode&#039;&#039;; &#039;&#039;filepath&#039;&#039; [; &#039;&#039;colsep&#039;&#039;=blank; &#039;&#039;header&#039;&#039;=0; &#039;&#039;skiplines&#039;&#039;=0; &#039;&#039;loadlines&#039;&#039;=*]&lt;br /&gt;
This function loads numerical data tables or string data tables from the specified text file &#039;&#039;filepath&#039;&#039;. The result of the function is a [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Parameter_Table|parameter table item]] or an [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Extended_Table|extended table]] containing the loaded data or an empty string if the function failes.&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;textmode&#039;&#039;&amp;lt;/code&amp;gt;: &#039;&#039;&#039;text&#039;&#039;&#039; for normal text files and &#039;&#039;&#039;textcontinuation&#039;&#039;&#039; if the text file may contain [[Programmer_Guide/Source_code#Escape_and_Continuation_Character|continuation lines]]&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;filepath&#039;&#039;&amp;lt;/code&amp;gt;: the path of the file containing the data to be loaded&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;colsep&#039;&#039;&amp;lt;/code&amp;gt;: the column seperator: &#039;&#039;&#039;blank&#039;&#039;&#039;, &#039;&#039;&#039;tab&#039;&#039;&#039;, &#039;&#039;&#039;comma&#039;&#039;&#039; or &#039;&#039;&#039;semicolon&#039;&#039;&#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;header&#039;&#039;&amp;lt;/code&amp;gt;: If set to &#039;&#039;&#039;yes&#039;&#039;&#039; (or &#039;&#039;&#039;1&#039;&#039;&#039;), the first line of the file is interpreted as header-line, and the value of each header column is used as name for the corresponding table field. Otherwise, no header-line is assumed and the table fields are not named.&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;skiplines&#039;&#039;&amp;lt;/code&amp;gt;: number of file lines to be skipped (not stored in the table)&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;loadlines&#039;&#039;&amp;lt;/code&amp;gt;: number of file lines to be loaded; use the character &#039;&#039;&#039;*&#039;&#039;&#039; (=default) to load the whole file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON loadData &#039;&#039;&#039;binary&#039;&#039;&#039;; &#039;&#039;filepath&#039;&#039; [; &#039;&#039;combine&#039;&#039;=0; &#039;&#039;sec1&#039;&#039; [&#039;&#039;mv1&#039;&#039;]; ...]&lt;br /&gt;
Load the specified sections (&#039;&#039;sec1&#039;&#039;, ..) of the [[Programmer_Guide/Shell_Items/File/Introducing_File_Items#Binary_Files|binary file]] &#039;&#039;filepath&#039;&#039;. If &#039;&#039;combine&#039;&#039; is set to &#039;&#039;&#039;yes&#039;&#039;&#039; (or &#039;&#039;&#039;1&#039;&#039;&#039;) the loaded data are combined into one parameter table, otherwise for each section one parameter table is used. The result of this function is a blank seperated list of parameter table items (&#039;&#039;combine&#039;&#039;=0), one parametr table item (&#039;&#039;combine&#039;&#039;=1 or only one section was specified) or an empty sting if the function failes. The missing value (mv1, ..) parameter, which can be specified for each section separately, is only necessary if multiple sections are combined into one table. In this the missing value parameters are passed to the function [[Programmer_Guide/Command_Reference/EVAL/interp|eval interp()], which is used to allign all data to the same length.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON saveData &#039;&#039;&#039;text&#039;&#039;&#039;|&#039;&#039;&#039;ascii&#039;&#039;&#039;; &#039;&#039;table&#039;&#039;; &#039;&#039;filepath&#039;&#039; [; &#039;&#039;header&#039;&#039;=0; &#039;&#039;colsep&#039;&#039;=blank; &#039;&#039;decsym&#039;&#039;=DOT; &#039;&#039;floatfmt&#039;&#039;=%g;  &#039;&#039;intfmt&#039;&#039;=%g]&lt;br /&gt;
Save the parameter or extended table &#039;&#039;table&#039;&#039; into the text file &#039;&#039;filepath&#039;&#039;.  &lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;header&#039;&#039;&amp;lt;/code&amp;gt;: If set to &#039;&#039;&#039;yes&#039;&#039;&#039; (or &#039;&#039;&#039;1&#039;&#039;&#039;), field names of the table are stored in the first line of the text file. Otherwise, no header-line is stored in the file.&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;colsep&#039;&#039;&amp;lt;/code&amp;gt;: the column seperator: &#039;&#039;&#039;blank&#039;&#039;&#039;, &#039;&#039;&#039;tab&#039;&#039;&#039;, &#039;&#039;&#039;comma&#039;&#039;&#039; or &#039;&#039;&#039;semicolon&#039;&#039;&#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;decsym&#039;&#039;&amp;lt;/code&amp;gt;: the decimal symbol to be used for floating point numbers: &#039;&#039;&#039;dot&#039;&#039;&#039; or &#039;&#039;&#039;comma&#039;&#039;&#039;&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;floatfmt&#039;&#039;&amp;lt;/code&amp;gt;: the format of floating point numbers; any valid float/double C-format string (e.g.: %g, %.2f, ...)&lt;br /&gt;
:&amp;lt;code&amp;gt;&#039;&#039;intfmt&#039;&#039;&amp;lt;/code&amp;gt;: the format of integer numbers; any valid float/double C-format string (e.g.: %.0f, ...)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 CON saveData &#039;&#039;&#039;text&#039;&#039;&#039;|&#039;&#039;&#039;ascii&#039;&#039;&#039;; &#039;&#039;table&#039;&#039;; CLIPBOARD [; &#039;&#039;header&#039;&#039;=0; &#039;&#039;colsep&#039;&#039;=blank; &#039;&#039;decsym&#039;&#039;=DOT; &#039;&#039;floatfmt&#039;&#039;=%g;  &#039;&#039;intfmt&#039;&#039;=%g; &#039;&#039;fieldlist&#039;&#039;]&lt;br /&gt;
Copy the parameter or extended table &#039;&#039;table&#039;&#039; to the clipboard. All arguments have the same meaning as for the file output. In the extra argument &#039;&#039;fieldlist&#039;&#039; a blank seperated list of table field-ids which should be copied ca be specified. If this argument is not supplied, all fields are copied.&lt;br /&gt;
&lt;br /&gt;
For example, the command &amp;lt;code&amp;gt;con savedata text; &#039;&#039;datatable&#039;&#039;; clipboard; yes; semicolon; comma&amp;lt;/code&amp;gt; can be used to copy the &#039;&#039;datatable&#039;&#039; to the clipboard, from where it can be pasted into a spreadsheet application. &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 CON saveDataDlg &#039;&#039;table&#039;&#039; [; &#039;&#039;trans&#039;&#039;=no; &#039;&#039;title&#039;&#039;=Save Table; &#039;&#039;colsep&#039;&#039;=blank; &#039;&#039;decsym&#039;&#039;=dot; &#039;&#039;header&#039;&#039;=no; &#039;&#039;floatfmt&#039;&#039;=%g; &#039;&#039;intfmt&#039;&#039;=%d]&lt;br /&gt;
This function displays a dialog where the arguments of the &amp;lt;code&amp;gt;saveData&amp;lt;/code&amp;gt; functions can be entered.&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/CONLOG&amp;diff=9936</id>
		<title>Programmer Guide/Macro Library/CONLOG</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/CONLOG&amp;diff=9936"/>
		<updated>2018-03-15T08:37:29Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:ConLog - Write messages to the Console and/or the Log-window}}&lt;br /&gt;
 CONLOG [&amp;lt;var&amp;gt;line1&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;line2&amp;lt;/var&amp;gt; ..]] [ &amp;lt;var&amp;gt;options&amp;lt;/var&amp;gt; ]&lt;br /&gt;
:Write the specified text-lines (&amp;lt;var&amp;gt;line1&amp;lt;/var&amp;gt;, ...) to the [[User_Guide/STX_Console|Console window]] and/or the [[User_Guide/Log_Window|Log-window]]. This function can be used by scripts to write error- and progress-information to the Console. It&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;einrahmen&amp;quot;&lt;br /&gt;
!argument !!description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;var&amp;gt;line1&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;line2&amp;lt;/var&amp;gt;, ...&lt;br /&gt;
|The text lines to be written to the window(s).&lt;br /&gt;
|-&lt;br /&gt;
!option !!description !!default&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Noconsole&amp;lt;/code&amp;gt;&lt;br /&gt;
|Output only to the Log-window and not to the Console window.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Shell&amp;lt;/code&amp;gt;&lt;br /&gt;
|Write the prefix &amp;lt;code&amp;gt;&#039;&#039;appid&#039;&#039;:&#039;&#039;currtime&#039;&#039; - &amp;lt;/code&amp;gt; before each text line. Where &#039;&#039;appid&#039;&#039; is the value of variable &amp;lt;code&amp;gt;AppName&amp;lt;/code&amp;gt; and &#039;&#039;currtime&#039;&#039; is the current time (hh.mm.ss).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Error&amp;lt;/code&amp;gt;&lt;br /&gt;
|Write the prefix &amp;lt;code&amp;gt;Error! - &amp;lt;/code&amp;gt; before each text line.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Warning&amp;lt;/code&amp;gt;&lt;br /&gt;
|Write the prefix &amp;lt;code&amp;gt;Warning! - &amp;lt;/code&amp;gt; before each text line.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/X&amp;lt;/code&amp;gt;&amp;lt;BR&amp;gt;&amp;lt;code&amp;gt;/X=&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;n&lt;br /&gt;
|Exit from &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; macro levels. If &amp;lt;code&amp;gt;/X&amp;lt;/code&amp;gt; (eXit) is supplied without a number, the number of levels &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; is set to 2 (return to caller).&lt;br /&gt;
(see command [[Programmer_Guide/Command_Reference/EXIT|&amp;lt;code&amp;gt;EXIT&amp;lt;/code&amp;gt;]] for details)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Ton&amp;lt;/code&amp;gt;&lt;br /&gt;
|Turn timer on. If timer is already active, the elapsed time (since timer was started) is displayed.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Toff&amp;lt;/code&amp;gt;&lt;br /&gt;
|Turn timer off (if active) and display elapsed time (since timer was started).&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Result&amp;lt;/code&amp;gt;&amp;lt;BR&amp;gt;&amp;lt;code&amp;gt;Result=&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;res&amp;lt;/var&amp;gt;&lt;br /&gt;
|With this option the result value to be returned with the /X option can be specified. If the value &amp;lt;var&amp;gt;res&amp;lt;/var&amp;gt; is not supplied, an empty string (&amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt;) is returned.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/Progress&amp;lt;/code&amp;gt;&lt;br /&gt;
|If this option is supplied, &#039;&#039;&#039;all other options are ignored&#039;&#039;&#039; and the text is written to the Console window only. The first line is written with the &#039;&#039;&#039;overwrite&#039;&#039;&#039; mode, this means the text &amp;lt;var&amp;gt;line1&amp;lt;/var&amp;gt; replaces the last output line.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;/File=&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;br /&gt;
|Appends the text lines to the file with path &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; (opened temporary in text-append mode) or to the fileitem &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; (if &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; is the id of a textfileitem)&lt;br /&gt;
|-&lt;br /&gt;
!RESULT !!description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;undefined&#039;&#039; || if &amp;lt;code&amp;gt;/X&amp;lt;/code&amp;gt; is not supplied&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&amp;lt;var&amp;gt;res&amp;lt;/var&amp;gt;&#039; or &amp;lt;nowiki&amp;gt;&#039;&#039;&amp;lt;/nowiki&amp;gt; || if &amp;lt;code&amp;gt;/X&amp;lt;/code&amp;gt; is supplied; the value is returned to the macro selected by the level &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; specified with the option &amp;lt;code&amp;gt;/X&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
;See also:&lt;br /&gt;
[[../LOGWINDOW|LogWindow]], [[../UM|UM and EM]], [[../BUTIL#MsgBox|MsgBox]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/ydiff&amp;diff=9922</id>
		<title>Programmer Guide/Command Reference/EVAL/ydiff</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/ydiff&amp;diff=9922"/>
		<updated>2018-03-09T08:09:39Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Calculates the differentiation (differnce quotients) of the vector &#039;&#039;y&#039;&#039; = f(&#039;&#039;x&#039;&#039;).&lt;br /&gt;
----&lt;br /&gt;
;Usage 1: &amp;lt;code&amp;gt;ydiff(&amp;lt;var&amp;gt;y&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; {, &amp;lt;var&amp;gt;dx&amp;lt;sub&amp;gt;scalar&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;=1})&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result 1: The result is the vector &#039;&#039;r&#039;&#039; with &amp;lt;code&amp;gt;nrow(&#039;&#039;y&#039;&#039;)-1&amp;lt;/code&amp;gt;elements. &lt;br /&gt;
::&amp;lt;code&amp;gt;&#039;&#039;r&#039;&#039;[i]=(&#039;&#039;y&#039;&#039;[i+1]-&#039;&#039;y&#039;&#039;[i])/dx; with: i=0..nrow(&#039;&#039;y&#039;&#039;)-2&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
;Usage 2: &amp;lt;code&amp;gt;ydiff(&amp;lt;var&amp;gt;y&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;x&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result 2: The result is the vector &#039;&#039;r&#039;&#039; with &amp;lt;code&amp;gt;nrow(&#039;&#039;y&#039;&#039;)-1&amp;lt;/code&amp;gt;elements. &lt;br /&gt;
::&amp;lt;code&amp;gt;&#039;&#039;r&#039;&#039;[i]=(&#039;&#039;y&#039;&#039;[i+1]-&#039;&#039;y&#039;&#039;[i])/(&#039;&#039;x&#039;&#039;[i+1]-&#039;&#039;x&#039;&#039;[i]); with: i=0..nrow(&#039;&#039;y&#039;&#039;)-2&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
;Usage 3: &amp;lt;code&amp;gt;ydiff(&amp;lt;var&amp;gt;k&amp;lt;sub&amp;gt;number&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;x&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result 3: The result is the vector &#039;&#039;r&#039;&#039; with &amp;lt;code&amp;gt;nrow(&#039;&#039;y&#039;&#039;)-1&amp;lt;/code&amp;gt;elements. This version is normally used for signal differentiation (with: 0 &amp;amp;le; &amp;lt;var&amp;gt;k&amp;lt;sub&amp;gt;number&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;amp;le; 1).&lt;br /&gt;
::&amp;lt;code&amp;gt;&#039;&#039;r&#039;&#039;[i]=&#039;&#039;x&#039;&#039;[i+1]-&#039;&#039;k&#039;&#039;.&#039;&#039;x&#039;&#039;[i]; with: i=0..nrow(&#039;&#039;y&#039;&#039;)-2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;See also: [[../yint|yint]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/ydiff&amp;diff=9921</id>
		<title>Programmer Guide/Command Reference/EVAL/ydiff</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/ydiff&amp;diff=9921"/>
		<updated>2018-03-09T08:09:18Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Calculates the differentiation (differnce quotients) of the vector &#039;&#039;y&#039;&#039; = f(&#039;&#039;x&#039;&#039;).&lt;br /&gt;
----&lt;br /&gt;
;Usage 1: &amp;lt;code&amp;gt;ydiff(&amp;lt;var&amp;gt;y&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; {, &amp;lt;var&amp;gt;dx&amp;lt;sub&amp;gt;scalar&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;=1})&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result 1: The result is the vector &#039;&#039;r&#039;&#039; with &amp;lt;code&amp;gt;nrow(&#039;&#039;y&#039;&#039;)-1&amp;lt;/code&amp;gt;elements. &lt;br /&gt;
::&amp;lt;code&amp;gt;&#039;&#039;r&#039;&#039;[i]=(&#039;&#039;y&#039;&#039;[i+1]-&#039;&#039;y&#039;&#039;[i])/dx; with: i=0..nrow(&#039;&#039;y&#039;&#039;)-2&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
;Usage 2: &amp;lt;code&amp;gt;ydiff(&amp;lt;var&amp;gt;y&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;x&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result 2: The result is the vector &#039;&#039;r&#039;&#039; with &amp;lt;code&amp;gt;nrow(&#039;&#039;y&#039;&#039;)-1&amp;lt;/code&amp;gt;elements. &lt;br /&gt;
::&amp;lt;code&amp;gt;&#039;&#039;r&#039;&#039;[i]=(&#039;&#039;y&#039;&#039;[i+1]-&#039;&#039;y&#039;&#039;[i])/(&#039;&#039;x&#039;&#039;[i+1]-&#039;&#039;x&#039;&#039;[i]); with: i=0..nrow(&#039;&#039;y&#039;&#039;)-2&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
;Usage 3: &amp;lt;code&amp;gt;ydiff(&amp;lt;var&amp;gt;k&amp;lt;sub&amp;gt;number&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;x&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result 3: The result is the vector &#039;&#039;r&#039;&#039; with &amp;lt;code&amp;gt;nrow(&#039;&#039;y&#039;&#039;)-1&amp;lt;/code&amp;gt;elements. This version is normally used for signal differentiation (with: 0 &amp;amp;le; &amp;lt;var&amp;gt;k&amp;lt;sub&amp;gt;number&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;amp;le; 1).&lt;br /&gt;
::&amp;lt;code&amp;gt;&#039;&#039;r&#039;&#039;[i]=&#039;&#039;x&#039;&#039;[i+1]-&#039;&#039;k&#039;&#039;.&#039;&#039;y&#039;&#039;[i]; with: i=0..nrow(&#039;&#039;y&#039;&#039;)-2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;See also: [[../yint|yint]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/ydiff&amp;diff=9920</id>
		<title>Programmer Guide/Command Reference/EVAL/ydiff</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/ydiff&amp;diff=9920"/>
		<updated>2018-03-09T08:08:51Z</updated>

		<summary type="html">&lt;p&gt;Toni: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
Calculates the differentiation (differnce quotients) of the vector &#039;&#039;y&#039;&#039; = f(&#039;&#039;x&#039;&#039;).&lt;br /&gt;
----&lt;br /&gt;
;Usage 1: &amp;lt;code&amp;gt;ydiff(&amp;lt;var&amp;gt;y&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; {, &amp;lt;var&amp;gt;dx&amp;lt;sub&amp;gt;scalar&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;=1})&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result 1: The result is the vector &#039;&#039;r&#039;&#039; with &amp;lt;code&amp;gt;nrow(&#039;&#039;y&#039;&#039;)-1&amp;lt;/code&amp;gt;elements. &lt;br /&gt;
::&amp;lt;code&amp;gt;&#039;&#039;r&#039;&#039;[i]=(&#039;&#039;y&#039;&#039;[i+1]-&#039;&#039;y&#039;&#039;[i])/dx; with: i=0..nrow(&#039;&#039;y&#039;&#039;)-2&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
;Usage 2: &amp;lt;code&amp;gt;ydiff(&amp;lt;var&amp;gt;y&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;x&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result 2: The result is the vector &#039;&#039;r&#039;&#039; with &amp;lt;code&amp;gt;nrow(&#039;&#039;y&#039;&#039;)-1&amp;lt;/code&amp;gt;elements. &lt;br /&gt;
::&amp;lt;code&amp;gt;&#039;&#039;r&#039;&#039;[i]=(&#039;&#039;y&#039;&#039;[i+1]-&#039;&#039;y&#039;&#039;[i])/(&#039;&#039;x&#039;&#039;[i+1]-&#039;&#039;x&#039;&#039;[i]); with: i=0..nrow(&#039;&#039;y&#039;&#039;)-2&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
;Usage 3: &amp;lt;code&amp;gt;ydiff(&amp;lt;var&amp;gt;k&amp;lt;sub&amp;gt;number&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;x&amp;lt;sub&amp;gt;vector&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
;Result 3: The result is the vector &#039;&#039;r&#039;&#039; with &amp;lt;code&amp;gt;nrow(&#039;&#039;y&#039;&#039;)-1&amp;lt;/code&amp;gt;elements. This version is normally used for signal differentiation (with: 0 &amp;amp;le; &amp;lt;var&amp;gt;k&amp;lt;sub&amp;gt;number&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;amp;le 1).&lt;br /&gt;
::&amp;lt;code&amp;gt;&#039;&#039;r&#039;&#039;[i]=&#039;&#039;x&#039;&#039;[i+1]-&#039;&#039;k&#039;&#039;.&#039;&#039;y&#039;&#039;[i]; with: i=0..nrow(&#039;&#039;y&#039;&#039;)-2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;See also: [[../yint|yint]]&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Toni</name></author>
	</entry>
</feed>