Next: , Previous: L tutorial for the C programmer, Up: L tutorial for the C programmer


2.1.1 Translating C into L

First, you want to need at least as proficient with L than you were with C.

L is basically compatible with C, but there are some syntaxic differences.

Let's see our first example:

     int
     foo(int a, int b)
     {
       return (a * (a + b);
     }

In this short example, you can see that L syntax is quite close to the one in C. Still, here are the main differences that you will find when you want to translate C code into L :