<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hello McStas users,
<p>I've experienced a stupid bug that occurs when you use expressions for
a component parameter, for instance:
<p><tt>COMPONENT SC1 = Channeled_guide(</tt>
<br><tt> w1 = 0.031, h1 = 0.054,</tt>
<br><tt> w2 = 0.031, h2 = 0.054,</tt>
<br><tt> l = 0.9144, d = 0.28/1000, k = 3,</tt>
<br><tt> R0 = 0.98,</tt>
<br><tt> Qcx = 0.021, Qcy = 0.021,</tt>
<br><tt> alphax = 6.07, alphay = 6.07,</tt>
<br><tt> mx = 1, my = 1, W=(1/300) )</tt>
<br><tt>AT (0, 0, 2.7473) RELATIVE Source</tt>
<p>Here all is ok (parameters are doubles) except parameter W because 1
is an integer, 300 also, and the ratio as integers is 0.
<br>You should use 1.0/300.0 (think of Fortran)
<br>All is ok when using variables because they are usually already doubles
(e.g. W=2*PI/3+sqrt(2) ).
<p>Cheers. Emmanuel.
<pre>--
What's up Doc ?
--------------------------------------------
Emmanuel FARHI, <A HREF="http://www.ill.fr/tas/people/Farhi.html">http://www.ill.fr/tas/people/Farhi.html</A> \|/ ____ \|/
CS-Group ILL4/156, Institut Laue-Langevin (ILL) Grenoble ~@-/ oO \-@~
6 rue J. Horowitz, BP 156, 38042 Grenoble Cedex 9,France /_( \__/ )_\
Work :Tel (33/0) 4 76 20 71 35. Fax (33/0) 4 76 48 39 06 \__U_/</pre>
</html>