Are arrays persistent even when "Persistent" is not selected?
Posted: Tue Sep 03, 2019 6:54 am
For example if I run this from Preview, the first time it will print 1, but the second time it will return 0. Running it for the third time it returns 1 again (basically it works as expected every odd time). I thought arrays do not keep their contents if they are not set to "Persistent"?
Code: Select all
<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ZGameEditor application" FileVersion="2">
<OnLoaded>
<ZExpression>
<Expression>
<![CDATA[Array1[0] = 1-Array1[0];
trace ( intToStr(Array1[0]) );
quit();]]>
</Expression>
</ZExpression>
</OnLoaded>
<Content>
<Array Name="Array1" Type="4" SizeDim1="1"/>
</Content>
</ZApplication>