{"id":3389,"date":"2019-02-12T16:09:08","date_gmt":"2019-02-12T16:09:08","guid":{"rendered":"https:\/\/cyflexdoc.wpengine.com\/usage-help-manual\/19-variables-and-computations\/arr_size\/"},"modified":"2025-07-25T12:28:33","modified_gmt":"2025-07-25T17:28:33","slug":"arr_size","status":"publish","type":"page","link":"https:\/\/cyflex.com\/index.php\/usage-help-manual\/2-variables-and-computations\/arr_size\/","title":{"rendered":"arr_size"},"content":{"rendered":"<h3>Purpose:<\/h3>\n<blockquote>\n<p>Determine the size of array variable or a particular dimension of the variable.<\/p>\n<\/blockquote>\n<dl>\n<dd><\/dd>\n<\/dl>\n<h3>Enter:<\/h3>\n<dl>\n<dd><strong>arr_size<\/strong>\u00a0 &lt;label_root&gt; [dimension_index] [-q] [-h]<\/dd>\n<\/dl>\n<h3>Where:<\/h3>\n<dl>\n<dd>\n<div>\n<table style=\"width: 96.94%; height: 20px;\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr style=\"height: 16px;\">\n<td style=\"width: 5.62%; height: 10px;\">\n<p>label_root<\/p>\n<\/td>\n<td style=\"width: 252.45%; height: 10px;\">\n<p>Specify the base label of any array variable without any dimensional notation. Example: my_array<\/p>\n<\/td>\n<\/tr>\n<tr style=\"height: 16px;\">\n<td style=\"width: 5.62%; height: 10px;\">\n<p>dimension_index<\/p>\n<\/td>\n<td style=\"width: 252.45%; height: 10px;\">\n<p>Optional. Specify an index number indicating for which dimension the size should be returned.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 5.62%;\">\n<p>-q<\/p>\n<\/td>\n<td style=\"width: 252.45%;\">\n<p>Optional. Specify -q for quiet output, displaying only the size or -1 on error.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 5.62%;\">\n<p>-h<\/p>\n<\/td>\n<td style=\"width: 252.45%;\">\n<p>Optional. Specify -h to display help usage and exit.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/dd>\n<\/dl>\n<dl>\n<dt>\n<h3>Example:<\/h3>\n<\/dt>\n<\/dl>\n<dl>\n<dd><strong>arr_size<\/strong>\u00a0 my_array<\/p>\n<p>The above command prints the dimension size of each dimension of the my_array variable in the form: <br \/>\nmy_array:A:B:C\u2026<br \/>\nSizes of each dimension and the number of dimensions are displayed. This returns a -1, since no particular dimension index was specified.<\/dd>\n<\/dl>\n<dl>\n<dd><strong>arr_size<\/strong>\u00a0 my_array 0<\/dd>\n<dd>This prints the array size of each dimension as in the previous example but returns the &#8216;A&#8217; value to the shell.<\/dd>\n<\/dl>\n<h3>Notes:<\/h3>\n<dl>\n<dd>Note that the printed notation such as my_array:3:3 indicates the maximum size of each dimension, but the variable &#8220;my_array:3:3&#8221; does not exist since the indices are zero-based and would be numbered 0, 1, 2. <\/p>\n<p>The value returned to the shell is limited to 0 through 255; values greater than 255 are returned as -1. If no dimension index is specified, -1 is returned.<\/p>\n<p>If the actual dimension is greater than 255, a message is displayed on the console and a value of -1 is returned.<\/dd>\n<\/dl>\n<h3>See Also:<\/h3>\n<dl>\n<dd><a href=\"https:\/\/cyflex.com\/index.php\/usage-help-manual\/2-variables-and-computations\/arr_specs\/\">arr_specs<\/a><\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>Purpose: Determine the size of array variable or a particular dimension of the variable. Enter: arr_size\u00a0 &lt;label_root&gt; [dimension_index] [-q] [-h] Where: label_root Specify the base label of any array variable without any dimensional notation. Example: my_array dimension_index Optional. Specify an index number indicating for which dimension the size should be returned. -q Optional. Specify -q [&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-3389","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/3389","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=3389"}],"version-history":[{"count":0,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/3389\/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=3389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}