<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Luke,<br>
      <br>
      and what about using a function or a procedure? <br>
      <br>
      Lech<br>
      <br>
      W dniu 09.06.2016 o 04:16, Luke Osburn pisze:<br>
    </div>
    <blockquote
cite="mid:CAF12=eoxvZ5eX8X+kZdoUxWwz+MeQpRfAipVWYjwptdpkyqK3g@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>The do loop that I use loads a sequence of .hdf files and I
          need to run about several hundred lines of code on it. The
          only alternative that I can think of is to have literally a do
          loop with several hundred lines of code in it. Surely there
          has to be a better way?</div>
        <div><br>
        </div>
        <div>Cheers</div>
        <div>Luke</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On 9 June 2016 at 02:55, Rick Brownrigg
          <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>&gt;</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>Hi Luke,<br>
                    <br>
                  </div>
                  It looks like what we are seeing is that each call to
                  loadscript() is a directive to load script that is to
                  be queued-up and executed at the conclusion of the
                  loop.  I don't get that understanding from the docs,
                  and I can't say if its intended behavior or not. <br>
                  <br>
                </div>
                In any case, I'm not sure what you are trying to do, but
                repeatedly loading a script inside a loop sounds like a
                lot od duplication and performance overhead.  Is there
                other way to refactor your code?<br>
                <br>
              </div>
              Rick<br>
            </div>
            <div class="gmail_extra"><br>
              <div class="gmail_quote">
                <div>
                  <div class="h5">On Wed, Jun 8, 2016 at 2:18 AM, Luke
                    Osburn <span dir="ltr">&lt;<a
                        moz-do-not-send="true"
                        href="mailto:luke.osburn@monash.edu"
                        target="_blank">luke.osburn@monash.edu</a>&gt;</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">
                      <div dir="ltr">Hi all,
                        <div><br>
                        </div>
                        <div>I have run into something of a problem. I
                          have a lot of code that needs to run on a lot
                          of data and anticipated being able to use the
                          loadscript function within do loops but it
                          works in an odd way: a much simpler example:<br>
                          <br>
                          "Original script"<br>
                          <div>do ray=0,3</div>
                          <div>   loadscript("sunshine.ncl")</div>
                          <div>end do<br>
                            <br>
                            Where sunshine.ncl is:</div>
                          <div><br>
                          </div>
                          <div>
                            <div>xx=ray*2</div>
                            <div>print(xx)</div>
                            <br>
                            The output of this combination of scripts
                            is:</div>
                          <div><br>
                          </div>
                          <div>8</div>
                          <div>8</div>
                          <div>8</div>
                          <div>8</div>
                          <div><br>
                          </div>
                          <div>But I want to be able to use the value of
                            ray in "Sunshine.ncl" as it loops and get:</div>
                          <div><br>
                          </div>
                          <div>0</div>
                          <div>2</div>
                          <div>4</div>
                          <div>6</div>
                          <div><br>
                          </div>
                          <div>If anyone knows how to achieve something
                            like this or a workaround that would be
                            greatly appreciated.</div>
                          <div><br>
                          </div>
                          <div>Regards</div>
                          <div>Luke</div>
                          <div><br>
                          </div>
                          <div><br>
                          </div>
                          <div>
                            <div>There were no errors reported.</div>
                            <div>NCAR Command Language Version 6.3.0<br>
                            </div>
                            <div>Linux s0000965 3.2.0-23-generic-pae
                              #36-Ubuntu SMP Tue Apr 10 22:19:09 UTC
                              2012 i686 i686 i386 GNU/Linux</div>
                            <div><br>
                            </div>
                          </div>
                          <div><br>
                          </div>
                          <div><br>
                          </div>
                          <div><br>
                          </div>
                        </div>
                      </div>
                      <br>
                    </div>
                  </div>
                  _______________________________________________<br>
                  ncl-talk mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
                  List instructions, subscriber options, unsubscribe:<br>
                  <a moz-do-not-send="true"
                    href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"
                    rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
                  <br>
                </blockquote>
              </div>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
ncl-talk mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
-------------------------------------------------------------------------
Lech Łobocki, Ph.D., D.Sc.
Professor,
Department of Environmental Engineering
Warsaw University of Technology
00-653 Warszawa, Nowowiejska 20, Poland
Tel. +48(22) 234-7606
fax: +48(22) 625-4305
e: <a class="moz-txt-link-abbreviated" href="mailto:lech.lobocki@is.pw.edu.pl">lech.lobocki@is.pw.edu.pl</a>
<a class="moz-txt-link-freetext" href="http://www.meteo.is.pw.edu.pl/">http://www.meteo.is.pw.edu.pl/</a>
-------------------------------------------------------------------------
</pre>
  </body>
</html>