Damian said to ignore this part of his question, but for the sake of the
archives and other potential users:
> Also, in the interests of succinct code, are there any plans to support
> in Chapel a ternary operator like the '?' of C/C++ or the ternary 'if'
> of ython, i.e. respectively
>
> x = condition ? resultA : resultB; // C/C++ (Java)
This form would be difficult to support in Chapel, due to ':'s role in
specifying type specifications and casts.
> or
> x = resultA if condition else resultB; // Python (since V2.6??)
>
> or the more general (and supperior) use of if/then/else within an
> assignment.
>
> variable := ( if condition then resultA else resultB );
This form is supported by Chapel today:
variable = if condition then resultA else resultB;
In some contexts, one can also drop the 'else' -- as a means of filtering
results in an iteration, for example.
-Brad
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users