<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#0b5394">Thank you very much Markus,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#0b5394"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#0b5394">I will use your solution.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#0b5394"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:#0b5394">Regards</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><b><font color="#0b5394">Jesús P. de Vicente.-</font></b></div></div></div>
<br><div class="gmail_quote">2015-06-12 10:01 GMT+02:00  <span dir="ltr"><<a href="mailto:mcstas-users-request@mcstas.org" target="_blank">mcstas-users-request@mcstas.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send mcstas-users mailing list submissions to<br>
        <a href="mailto:mcstas-users@mcstas.org">mcstas-users@mcstas.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users" rel="noreferrer" target="_blank">http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:mcstas-users-request@mcstas.org">mcstas-users-request@mcstas.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:mcstas-users-owner@mcstas.org">mcstas-users-owner@mcstas.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of mcstas-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. WHEN and EXTEND card (Jes?s P. de Vicente)<br>
   2. Re: WHEN and EXTEND card (Markus Appel)<br>
   3. McStas component ESS_moderator (Pascale Deen)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 11 Jun 2015 19:29:23 +0200<br>
From: Jes?s P. de Vicente <<a href="mailto:jesuspedrodevicente@gmail.com">jesuspedrodevicente@gmail.com</a>><br>
To: "<a href="mailto:mcstas-users@mcstas.org">mcstas-users@mcstas.org</a>" <<a href="mailto:mcstas-users@mcstas.org">mcstas-users@mcstas.org</a>><br>
Subject: [mcstas-users] WHEN and EXTEND card<br>
Message-ID:<br>
        <CABTc3j8cyHoy8BQ=<a href="mailto:ntQYm0qLya5_wHMZNf7pSqJ_72gKJ4spkg@mail.gmail.com">ntQYm0qLya5_wHMZNf7pSqJ_72gKJ4spkg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear McStas team,<br>
<br>
I would like to ask you if the EXTEND card is executed independently if the<br>
WHEN card is true or false.<br>
<br>
Thank you very much.<br>
Kind regards<br>
<br>
*Jes?s P. de Vicente.-*<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.mcstas.org/pipermail/mcstas-users/attachments/20150611/f0fa915b/attachment-0001.html" rel="noreferrer" target="_blank">http://mailman.mcstas.org/pipermail/mcstas-users/attachments/20150611/f0fa915b/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 11 Jun 2015 19:43:11 +0200<br>
From: Markus Appel <<a href="mailto:masolomaster3000@googlemail.com">masolomaster3000@googlemail.com</a>><br>
To: <a href="mailto:mcstas-users@mcstas.org">mcstas-users@mcstas.org</a><br>
Subject: Re: [mcstas-users] WHEN and EXTEND card<br>
Message-ID: <<a href="mailto:5579C8AF.6020508@googlemail.com">5579C8AF.6020508@googlemail.com</a>><br>
Content-Type: text/plain; charset=windows-1252<br>
<br>
Hi Jes?s,<br>
<br>
the EXTEND block should only be executed if WHEN is true, but there<br>
was a bug in Mcstas <= 2.1 which only applied the WHEN condition to<br>
the first line of the EXTEND block and always executed the remaining<br>
lines.<br>
<br>
You can either upgrade to Mcstas 2.2a, or use an additional set of<br>
braces in the EXTEND block as work-around in older versions, like this:<br>
<br>
COMPONENT something = ...() WHEN (...)<br>
AT ...<br>
EXTEND<br>
%{<br>
  {<br>
   do_something();<br>
   do_something_else();<br>
   ... ;<br>
  }<br>
}<br>
<br>
Cheers,<br>
Markus<br>
<br>
On 06/11/2015 07:29 PM, Jes?s P. de Vicente wrote:<br>
> Dear McStas team,<br>
><br>
> I would like to ask you if the EXTEND card is executed<br>
> independently if the WHEN card is true or false.<br>
><br>
> Thank you very much. Kind regards<br>
><br>
> *Jes?s P. de Vicente.-*<br>
><br>
><br>
> _______________________________________________ mcstas-users<br>
> mailing list <a href="mailto:mcstas-users@mcstas.org">mcstas-users@mcstas.org</a><br>
> <a href="http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users" rel="noreferrer" target="_blank">http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users</a><br>
><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 11 Jun 2015 13:27:11 +0000<br>
From: Pascale Deen <<a href="mailto:pascale.deen@esss.se">pascale.deen@esss.se</a>><br>
To: "<a href="mailto:mcstas-users@mcstas.org">mcstas-users@mcstas.org</a>" <<a href="mailto:mcstas-users@mcstas.org">mcstas-users@mcstas.org</a>><br>
Subject: [mcstas-users] McStas component ESS_moderator<br>
Message-ID: <<a href="mailto:9338BDFE-B81A-42D5-A2E5-26775BC3BDD3@esss.se">9338BDFE-B81A-42D5-A2E5-26775BC3BDD3@esss.se</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hello,<br>
I am trying to run the moderator component<br>
<br>
COMPONENT ESS_Source = ESS_moderator(<br>
    isleft = 0.9, Lmin = 0.5, Lmax = 10, cold_frac = 0.5,<br>
    dist = 2, focus_xw = 0.2, focus_yh = 0.2, yheight_c = 0.03,<br>
    yheight_t = 0.03, n_pulses = 1, beamport_angle = 5,<br>
    sourcedef = "2015", extraction_opening = 120)<br>
  AT (0, 0, -0.1) RELATIVE Origin<br>
<br>
but I get the following warnings:<br>
/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:409:1: warning: control reaches end of non-void function [-Wreturn-type]<br>
} /* end of ESS_Mezei_cold_2012 */<br>
^<br>
/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:517:1: warning: control reaches end of non-void function [-Wreturn-type]<br>
} /* end of ESS_Mezei_cold */<br>
^<br>
/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:622:1: warning: control reaches end of non-void function [-Wreturn-type]<br>
} /* end of ESS_Mezei_thermal */<br>
^<br>
/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:639:1: warning: control reaches end of non-void function [-Wreturn-type]<br>
} /* end of ESS_2012_Lieutenant_cold */<br>
^<br>
/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:693:1: warning: control may reach end of non-void function [-Wreturn-type]<br>
} /* end of ESS_2013_Schoenfeldt_cold */<br>
^<br>
/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:719:1: warning: control may reach end of non-void function [-Wreturn-type]<br>
} /* end of ESS_2014_Schoenfeldt_cold */<br>
^<br>
/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:851:1: warning: control may reach end of non-void function [-Wreturn-type]<br>
} /* end of ESS_2013_Schoenfeldt_thermal */<br>
^<br>
/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:871:1: warning: control may reach end of non-void function [-Wreturn-type]<br>
} /* end of ESS_2014_Schoenfeldt_thermal */<br>
^<br>
/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:894:1: warning: control may reach end of non-void function [-Wreturn-type]<br>
} /* end of ESS_2015_Schoenfeldt_thermal */<br>
^<br>
/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:922:1: warning: control may reach end of non-void function [-Wreturn-type]<br>
} /* end of ESS_2015_Schoenfeldt_cold */<br>
^<br>
/Applications/McStas-2.2a.app/Contents/Resources/mcstas/2.2a/sources/ESS_moderator.comp:959:17: warning: expression result unused [-Wunused-value]<br>
    if(i==0)par3-14.27;<br>
            ~~~~^~~~~~<br>
11 warnings generated.<br>
----------------------------------------------------<br>
Pascale Deen<br>
Instrument Scientist - Chopper Spectrometry<br>
European Spallation Source ESS AB<br>
P.O Box 176, SE-221 00 Lund, Sweden<br>
Visiting address: Tunav?gen 24 Lund<br>
<br>
Adjunct Associate Professor<br>
Niels Bohr Institute<br>
University of Copenhagen<br>
<br>
Mobile: +46 721 792 079<br>
Phone: +46 46 888 3079<br>
E-mail: <a href="mailto:pascale.deen@esss.se">pascale.deen@esss.se</a><mailto:<a href="mailto:pascale.deen@esss.se">pascale.deen@esss.se</a>><br>
<br>
<a href="http://www.esss.se" rel="noreferrer" target="_blank">www.esss.se</a><<a href="http://www.esss.se/" rel="noreferrer" target="_blank">http://www.esss.se/</a>><br>
<br>
The European Spallation Source is a Partnership of 16 European Nations committed to the goal of collectively building and operating the world's leading facility for research using neutrons by the second quarter of the 21st Century<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.mcstas.org/pipermail/mcstas-users/attachments/20150611/649da88c/attachment.html" rel="noreferrer" target="_blank">http://mailman.mcstas.org/pipermail/mcstas-users/attachments/20150611/649da88c/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
mcstas-users mailing list<br>
<a href="mailto:mcstas-users@mcstas.org">mcstas-users@mcstas.org</a><br>
<a href="http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users" rel="noreferrer" target="_blank">http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users</a><br>
<br>
<br>
------------------------------<br>
<br>
End of mcstas-users Digest, Vol 40, Issue 3<br>
*******************************************<br>
</blockquote></div><br></div>