title: In Scheme language, how to assign a variable counter in an inner do-loop connected with the outer do-loop?
body: <p>I want to read 10 case files in Ansys Fluent and for each case file there are 10 data files to be read. Ansys Fluent uses Scheme programming language.
  I have to managed to get some answers to individual problems in the code here (<a href="https://stackoverflow.com/q/47822902/5682472">Evaluating a floating point variable in Scheme language</a>) and here
   (<a href="https://stackoverflow.com/q/47850005/5682472">How to increase counter in a do-loop within Scheme language?</a>), but when collecting the individual answers I realized that I need a new code for the counter which is used to read the data files through do-loop.
  Here is the code with solutions from from other question included:</p>
  
  <pre><code>(do ((i 10 (+ i 1))
       (j 5  (+ j 1)))
      ((&gt;= i 20) 'my-return-value)
    (ti-menu-load-string 
     (format #f "/file/read-case \"C:/DataProcessing/Case~a-time~a-sec/test/Case~a-time~a-sec.cas\"" i j i j))
    (do ((datafilenum 5.100 (+ datafilenum 0.100)))
        ((&gt;= datafilenum 6.000))
      (ti-menu-load-string (format #f "/file/read-data \"C:/DataProcessing/Case~a-time~a-sec/test/Case~a-time~a-sec-~.3f.dat\"" i j i j datafilenum))
      (ti-menu-load-string (format #f "/plot plot n \"C:/DataProcessing/Case~a-time~a-sec/test/water-vof/column-water-vof-at-~.3fs.txt\" y n n water vof y 0 1 0 16 ()" i j datafilenum))))
  </code></pre>
  
  <p>What I'm trying to achieve here is:
  read the case file</p>
  
  <pre><code>Case10-time5-sec.cas
  </code></pre>
  
  <p>then it reads the 10 data files and plot the answer</p>
  
  <pre><code>Case10-time5-sec-5.100.dat
  Case10-time5-sec-5.200.dat
  ...
  Case10-time5-sec-6.000.dat
  </code></pre>
  
  <p>Next loop:</p>
  
  <pre><code>Case11-time6-sec.cas
  </code></pre>
  
  <p>read the 10 data files and plot answer</p>
  
  <pre><code>Case11-time6-sec-6.100.dat
  Case11-time6-sec-6.200.dat
  ...
  Case11-time6-sec-7.000.dat
  </code></pre>
  
  <p>Next loop...</p>
  
  <p>So, how to change <code>datafilenum</code> starting with <code>5.100</code> in this code to <code>6.100</code>, <code>7.100</code>,  <code>7.100</code> etc. when <code>j</code> changes value in the upper loop, something like <code>j.100</code> and append this value to the exported text file <code>column-water-vof-at-~.3fs.txt</code>. And, of course change, <code>6.000</code> to <code>7.000</code>, <code>8.000</code>..., something like <code>j+1.000</code>? This got me very confused as I have used trial and error to achieve it!</p>