<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">I made a quick 3 line procedure that might do what you want. Utilising the list functionality. No error checks or anything but the simple idea could be expanded. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><div class="gmail_default">undef("test")</div><div class="gmail_default">procedure test(x, val)</div><div class="gmail_default">begin</div><div class="gmail_default"> print("Setting "+ListCount(x)+" variables to "+val)</div><div class="gmail_default"> do i=0, ListCount(x)-1</div><div class="gmail_default"> x[i] = val</div><div class="gmail_default"> end do</div><div class="gmail_default">end </div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">begin</div><div class="gmail_default"><br></div><div class="gmail_default">a=True</div><div class="gmail_default">b=True</div><div class="gmail_default">c=True</div><div class="gmail_default">d=True</div><div class="gmail_default"><br></div><div class="gmail_default">test( [/a,b,c,d/], False)</div><div class="gmail_default">print( (/a,b,c,d/) )</div><div class="gmail_default"><br></div><div class="gmail_default">end</div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">Alan.</div><div class="gmail_default"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 6 May 2015 at 09:04, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi Erik,<br><br></div>No, I don't believe the language supports multi-var assignment in the fashion you are wanting, nor is there an end-of-line delimiter (other than newline).<br><br></div>You could of course do something like:<br><br> res = new((/ 10 /), logical, True)<br><br></div>HTH....<br></div>Rick<br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, May 6, 2015 at 8:33 AM, Erik Jan Schaffernicht <span dir="ltr"><<a href="mailto:eschaffe@uni-koeln.de" target="_blank">eschaffe@uni-koeln.de</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">I use ten resources variables. At the beginning of my script I have to set them one by one to "true". That is ten lines of code without much interesting information. Is there a better/shorter way to do this? Eg. on one line?<br>
It is not only about these, furthermore, I have to define some arrays later on where I repeat a similar non-informative code as well over several lines.<br>
<br>
And a separating character to write more than one command per line does not exist, right?<br>
<br>
<br>
My actual code:<br>
Res1=true<br>
Res2=true<br>
...<br>
Res10=true<br>
<br>
Looking for sthg like:<br>
[ Res1, Res2, ..., Res10 ] = true<br>
<br>
<br>
<br>
<br>
<br>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>