[Developers] If clauses in schedule

Erik Schnetter schnetter at cct.lsu.edu
Mon Apr 7 13:21:19 CDT 2008


On Apr 7, 2008, at 12:43:45, Ian Hinder wrote:
> Would the current syntax be extended to allow the statements to be
> recalculated, which might have backward compatibility issues, or will
> there be a new syntax?  Perhaps we could find out if there are any  
> cases
> that broke by extending the old syntax, and fix those, as it would be
> very confusing to have two types of "if" in the schedule file.


It would be very difficult to combine both syntaxes.

The existing if statements are evaluated very early during a run and  
can only evaluate parameters, but can contain arbitrarily complex  
expressions since the expressions are transformed into C code.  In  
particular, they can also examine keyword and string parameters.

The new if clauses are evaluated at run time and can thus examine grid  
scalars.  Since there is no expression parser, they can only depend on  
whether a grid scalar is zero or not.  This is the same mechanism that  
is used for WHILE clauses.

-erik

-- 
Erik Schnetter <schnetter at cct.lsu.edu>   http://www.cct.lsu.edu/~eschnett/

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20080407/349c9ae2/attachment.bin 


More information about the Developers mailing list