<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How can I use arrays in ivyScript</title><link>https://answers.axonivy.com/questions/296/how-can-i-use-arrays-in-ivyscript</link><description>&lt;p&gt;I want to use Java arrays in ivyScript. But if I use &lt;code&gt;myArray[myIndex]&lt;/code&gt; then I get an error &lt;code&gt;unexpected token&lt;/code&gt;. &lt;/p&gt;
&lt;p&gt;So, for example how can I do something like: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;File dir = new File("myPath");
File[] fileList = dir.listFiles();
&lt;/code&gt;&lt;/pre&gt;</description><atom:link href="https://answers.axonivy.com/questions/296/how-can-i-use-arrays-in-ivyscript" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 03 Sep 2009 03:09:32 -0400</lastBuildDate><item><title>Answer by SupportIvyTeam</title><link>https://answers.axonivy.com/questions/296/how-can-i-use-arrays-in-ivyscript/297</link><description>&lt;p&gt;Arrays are not first order objects in ivyScript. But you can work with lists everywhere you would work with arrays in Java. Note, that conversion between arrays and lists happens automatically. So, e.g. this is completely valid and good ivyScript:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;File dir = new File("myPath");
List&amp;lt;File&amp;gt; fileList = dir.listFiles();
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SupportIvyTeam</dc:creator><pubDate>Thu, 03 Sep 2009 03:09:32 -0400</pubDate><guid>https://answers.axonivy.com/questions/296/how-can-i-use-arrays-in-ivyscript/297</guid></item></channel></rss>