Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EDT:Writing basic logic"

(New page: == Basic EGL statements == Assign x to y. <source lang="java"> y = x; </source> If-then statement. <source lang="java"> if ( x > 4 ) x = y; end </source> If-then-else statement. <s...)
 
(Removing all content from page)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Basic EGL statements  ==
 
  
Assign x to y.
 
<source lang="java">
 
y = x;
 
</source>
 
 
If-then statement.
 
<source lang="java">
 
if ( x > 4 )
 
  x = y;
 
end
 
</source>
 
 
If-then-else statement.
 
<source lang="java">
 
if ( x > 4 )
 
  x = y;
 
else
 
  x = 10;
 
end
 
</source>
 
 
While loop.
 
<source lang="java">
 
while ( x > 0 )
 
  counter += 1;
 
  x -= 1;
 
end
 
</source>
 
 
Return from a function.
 
<source lang="java">
 
return;
 
</source>
 
 
Return a value from a function.
 
<source lang="java">
 
return ( x );
 
</source>
 
 
[[Category:EDT]]
 

Latest revision as of 16:20, 14 February 2012

Back to the top