# Dear list and Mr. Taube<div># I want to use Grace with Scheme rather than SAL. I am using version 3.3.0 svn:1769. I looked at the &quot;SAL tutorials&quot; and tried to convert them to Scheme code. But I think some SAL commands does not exist in Scheme version. Like:</div>

<div><br></div><div>print &quot;Hello, world!&quot; -&gt; (print &quot;Hello, world!&quot;)</div><div># gives &quot;print: unbound variable&quot; error. I can just evaluate</div><div>&quot;Hello, world!&quot;</div><div># or try</div>

<div>(display &quot;Hello, world!&quot;)</div><div># But the output of (display) is yellow, not green and does not have &quot;\n&quot; character at the end.</div><div><br></div><div>print &quot;my key number: &quot;, between(60, 90) -&gt; (display &quot;my key number: &quot;  (between 60 90))</div>

<div># gives &quot;display argument 2, 66, is an integer, but should be an output port&quot; error. I have to write</div><div>(string-append &quot;my key number: &quot; (number-&gt;string (between 60 90)))</div><div><br>
</div><div><br></div><div># Another component I could not find (which is, I think, more important) is the loop macro.</div><div><div>loop repeat 5</div><div>  print &quot;a random keynum: &quot;, random(128)</div><div>end</div>
<div>---&gt;</div><div><div>(loop repeat 5</div><div>      (random 128))</div><div># gives: &gt;&gt;&gt; Error: Found &#39;repeat&#39; where operator expected.</div><div>clause context: &#39;repeat 5 (random 128)&#39;</div>
<div><br></div><div># and</div><div><br></div><div><div>loop for c in {a b c d e f g }</div><div>  print c</div><div>end</div><div>---&gt;</div><div><div>(loop for c in &#39;(a b c d e f g)</div><div>      (display c))</div>
<div># gives: &gt;&gt;&gt; Error: Expression expected but source code ran out.</div><div><br></div><div># Similarly,</div><div><div>loop for x from 1 to 10</div><div>  print &quot;x=&quot;, x</div><div>end</div><div>----&gt;</div>
<div><div>(loop for x from 1 to 10</div><div>      x)</div><div># gives the same error.</div></div></div><div><br></div></div></div><div># Of course a recursive approach using car&#39;s and cdr&#39;s works.</div><div>(define (play-chord chd)</div>
<div>  (if (not (equal? chd &#39;()))</div><div>    (begin (send &quot;mp:midi&quot; :key (car chd))</div><div>           (play-chord (cdr chd)))))</div><div>(play-chord &#39;(50 55 60))</div><div># But I think that the loop macro is not implemented in Grace. Am I correct or making a mistake?</div>
<div><br></div></div><div># Best regards,</div><div>-ugur guney-</div></div>