{"id":3886,"date":"2019-02-12T16:10:06","date_gmt":"2019-02-12T16:10:06","guid":{"rendered":"https:\/\/cyflexdoc.wpengine.com\/usage-help-manual\/19-variables-and-computations\/sarr\/"},"modified":"2026-05-20T12:54:19","modified_gmt":"2026-05-20T17:54:19","slug":"sarr","status":"publish","type":"page","link":"https:\/\/cyflex.com\/index.php\/usage-help-manual\/2-variables-and-computations\/sarr\/","title":{"rendered":"sarr"},"content":{"rendered":"<h3>Purpose:<\/h3>\n<dl>\n<dd><\/dd>\n<\/dl>\n<p style=\"padding-left: 40px;\">Set array variable elements to a specified value based on provided label and dimensions.<\/p>\n<h3>Enter:<\/h3>\n<dl>\n<dd><strong>sarr<\/strong> &lt;array_label&gt; &lt;value&gt;<\/dd>\n<\/dl>\n<h3>Where:<\/h3>\n<dl>\n<dd>\n<div>\n<table style=\"width: 100%; height: 240px;\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col \/>\n<col \/> <\/colgroup>\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 6.17%; height: 24px;\">array_label<\/td>\n<td style=\"width: 93.65%; height: 24px;\">\n<p>Specify the array variable label name.\u00a0 This may include dimension specifications using &#8216;:&#8217; for enums or &#8216;?&#8217; for variables.<br \/>\nSpecify the : symbol to designate that the following index is either a constant integer, an enum defined in the array_specs file, or an INTEGER_VARIABLE that contains the integer value of the dimension to be used.<br \/>\nSpecify the ? symbol to designate that the following index is either a constant integer, an enum defined in the array_specs file, or an INTEGER_VARIABLE that contains the integer value of the dimension to be used.<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 6.17%; height: 24px;\">value<\/td>\n<td style=\"width: 93.65%; height: 24px;\">Specify the value to assign to the specified elements of the array variable.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/dd>\n<\/dl>\n<h3>Example:<\/h3>\n<dl>\n<dd><strong>sarr<\/strong> my_arr 123<br \/>\nThe above command sets all array elements of &lt;my_arr&gt; to <em>123<\/em>.<\/p>\n<p><strong>sarr \u00a0<\/strong>my_vrbl:TC15 abcd<br \/>\nThe above command sets all the elements for array variable &lt;my_vrbl&gt; that are associated with enum element <em>TC15<\/em> to <em>abcd<\/em>.<\/p>\n<p><strong>sarr<\/strong> \u00a0 my_vrbl?count\u00a0 abcd<br \/>\nThe above command seta all the elements for array variable &lt;my_vrbl&gt; that are associated with the dimension number contained in the variable <em>count<\/em> to <em>abcd<\/em>.<\/p>\n<p><strong>sarr<\/strong> my_arr my_real<br \/>\nThe above command sets all array elements of <em>&lt;my_arr&gt;<\/em> to the value found in variable my_real.<\/p>\n<p><strong>sarr<\/strong> my_arr \u201cmy_real + 100[kpa]\u201d<br \/>\nThe above command sets all array elements of <em>&lt;my_arr&gt;<\/em> to the value of the computed expression.<\/p>\n<p><strong>sarr<\/strong> my_string \u00a0\u201c \u2018this is a literal string\u2019\u00a0 \u201c<br \/>\nThe above command sets all array elements of the string array <em>&lt;my_string&gt;<\/em> to \u00a0\u2018this is a literal string\u2019<\/p>\n<p><strong>sarr<\/strong> my_string<em>:0<\/em> \u00a0\u201c \u2018a go was performed on \u2019 + go_time\u00a0 \u201c<br \/>\nThe above command sets <em>&lt;my_string:0&gt;<\/em> to the result of the computed expression.\u2019<\/p>\n<\/dd>\n<\/dl>\n<h3>Notes:<\/h3>\n<dl>\n<dd>\n<p>When using the computed expression function &#8216;@set_array()&#8217; to set an array variable, the arguments must be enclosed with a single quote.<\/p>\n<p>For example:<br \/>\n@set_array( &#8216;my_vrbl:TC15&#8217;,\u00a0 &#8216;abcd&#8217; )<\/p>\n<\/dd>\n<\/dl>\n<h3>See Also:<\/h3>\n<p style=\"padding-left: 20px;\"><a href=\"https:\/\/cyflex.com\/index.php\/usage-help-manual\/2-variables-and-computations\/rvar\/\">rvar<\/a>, <a href=\"\/wp-content\/uploads\/Array-Variables.pdf\">Array Variables<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<dl>\n<dd><\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>Purpose: Set array variable elements to a specified value based on provided label and dimensions. Enter: sarr &lt;array_label&gt; &lt;value&gt; Where: array_label Specify the array variable label name.\u00a0 This may include dimension specifications using &#8216;:&#8217; for enums or &#8216;?&#8217; for variables. Specify the : symbol to designate that the following index is either a constant integer, [&hellip;]<\/p>\n","protected":false},"author":47,"featured_media":0,"parent":1966,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3886","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/3886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/comments?post=3886"}],"version-history":[{"count":0,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/3886\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/1966"}],"wp:attachment":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/media?parent=3886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}