« The OpenJFX Community Site Gets a Makeover | Main | Congratulations to the JavaFX Script Compiler Team - The Elephant is Through the Door »

December 04, 2007

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e54f133d69883400e54fa8d7868834

Listed below are links to weblogs that reference Compiled JavaFX for - Is it an Expression or a Statement?:

Comments

Jim Weaver

Patrick,
Thanks for your comment/question. You are correct. The last statement in the block would be returned automatically, and one could just have the function block include the foreach. I added a code snippet in this post to illustrate your point.
Thanks, Jim Weaver

Patrick Wright

Thanks for the answer, Jim. It's clearer now on a re-read.

One followup--are the return in getSomeOrdinals() and the local variable necessary? I'm wondering if in this case the last statement in the block would be returned automatically, and one could just have the function block include the foreach.

Thanks
Patrick

Jim Weaver

Thanks for your feedback, Patrick. I have expounded on the foreach expression, so please let me know if further clarification would be helpful. -Jim

Patrick Wright

Hi Jim

Some clarification of the expression syntax in this case would be helpful. The loop is clear, but it's not clear what the effect is of having "element" as the sole expression within the loop, and how this ends up appending to the sequence elements. Will foreach always generate a sequence based on the last value in the foreach block? Or can I also create a single value--for example, could I use this foreach expression syntax to create a single string containing all the elements, comma-separated?

Interesting comparison, thanks.
Patrick

The comments to this entry are closed.