Category:Fexl: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 15:
if (!f->L->L || !f->L->L->L) return f;
return A( A(f->L->L->R, f->R), A(f->L->R, f->R) );
}
</lang>
 
Fexl functions may have side effects -- after all, '''somebody's''' gotta do it. So for example here's the implementation of the char_put function, called as (char_get ch next), which prints the single character ch to stdout and then continues with next:
 
<lang C>
value fexl_char_put(value f)
{
if (!f->L->L) return f;
value x = f->L->R;
if (!arg(type_long,x)) return f;
 
putchar(get_long(x));
return f->R;
}
</lang>
Anonymous user