On 29/03/2011, at 4:28 AM, Rhythmic Fistman wrote:
> 
> How would I write that if statement?
> 
> I tried
> if(1 == 1) then {
> ...
> } else {} endif;
> 
> and it got confused.
> 
> I used 1 == 1 because I don't know what true is called.

One can always look at the library code for hints :)

A functional if is:

if .. then .. elif .. then .. else .. endif 

A procedural if is:

if .. do .. elif .. do .. else .. done

You need the procedural if to handle statements such as
declarations:

if windows do
  fun open:int -> int = "Windows_function($1)";
else
  fun open:int -> int = "Unix_function($1)";
done

You don't need a ; after a done these days.

The grammar is in the library too .. :)

--
john skaller
[email protected]





------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to