[mcstas-users] WHEN and EXTEND card
Markus Appel
masolomaster3000 at googlemail.com
Thu Jun 11 19:43:11 CEST 2015
Hi Jesús,
the EXTEND block should only be executed if WHEN is true, but there
was a bug in Mcstas <= 2.1 which only applied the WHEN condition to
the first line of the EXTEND block and always executed the remaining
lines.
You can either upgrade to Mcstas 2.2a, or use an additional set of
braces in the EXTEND block as work-around in older versions, like this:
COMPONENT something = ...() WHEN (...)
AT ...
EXTEND
%{
{
do_something();
do_something_else();
... ;
}
}
Cheers,
Markus
On 06/11/2015 07:29 PM, Jesús P. de Vicente wrote:
> Dear McStas team,
>
> I would like to ask you if the EXTEND card is executed
> independently if the WHEN card is true or false.
>
> Thank you very much. Kind regards
>
> *Jesús P. de Vicente.-*
>
>
> _______________________________________________ mcstas-users
> mailing list mcstas-users at mcstas.org
> http://mailman.mcstas.org/cgi-bin/mailman/listinfo/mcstas-users
>
More information about the mcstas-users
mailing list