On 29 March 2011 11:06, john skaller <skal...@users.sourceforge.net> wrote:
>
> 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

Thanks, I got it working. (The constant if, not the whole thing, I
still have a 200 item enum that needs to stay in sync with felix).

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

Actually I'm back in the endif days.

RF

------------------------------------------------------------------------------
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
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to