{"id":407,"date":"2021-09-03T20:00:27","date_gmt":"2021-09-03T20:00:27","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/programming-recall-a-batch-array-using-a-variable-21409-html"},"modified":"2021-09-03T20:00:27","modified_gmt":"2021-09-03T20:00:27","slug":"programming-recall-a-batch-array-using-a-variable-21409-html","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/recall-a-batch-array-using-a-variable\/21409.html","title":{"rendered":"Recall a Batch Array Using a Variable"},"content":{"rendered":"<p><td>I have used the following code to create a Batch Array.<\/p>\n<p>Set \/A Count=1<br \/>:LOOP<br \/>SET Temp[%Count%]=A<br \/>SET \/A Count+=1<br \/>IF %Count%==10 (GOTO EOF) ELSE GOTO LOOP <\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>Command Line: ECHO %Temp[1]%<br \/>Output = A<\/p>\n<p>Although what I want to do is to use a variable in place of the &#8220;1&#8221; in &#8220;Temp[1]&#8221;<\/p>\n<p>That way I can recall the entire array again <br \/>similar to how I originally created it using a Loop and Counter. <\/p>\n<p>1 &#8211; Set \/A Count=1<br \/>2 &#8211; :LOOP<br \/>3 &#8211; ECHO %Temp[%Count%]%<br \/>4 &#8211; IF %Count%==10 (GOTO EOF) ELSE GOTO LOOP <\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>Line 3: Is where I have the problem. I don&#8217;t know the correct code\/syntax to be able to output the data stored in the array.<\/p>\n<p>The code will only output the name of the array. Any Suggestions?<\/p>\n<\/td>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","meta":{"inline_featured_image":false,"iawp_total_views":30},"question-category":[],"question_tags":[],"class_list":["post-407","question","type-question","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=407"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=407"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=407"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}