Note: Code examples are not exactly one-to-one, there may be subtle differences in the semantics. See comments.
<table>
<tr>
<th>C</th><th>Nimrod</th><th>Comment</th>
</tr>
<tr>
<td>
```C
int x = foobar() ? 42 : 0;
```
</td>
<td>
```Nimrod
var x = if foobar(): 42 else: 0
```
</td>
<td>
<i>If-statements return the value of the expression they evaluate to, so Nimrod doesn't need a </i><b>ternary operator</b>.</i>
</td>
</tr>
<tr>
<td>
```C
void foobar(person_t *a) {
person_t b;
b = *a;
b.name = "Bob";
*a = b;
}
```
</td>
<td>
```Nimrod
proc foobar(a: ref TPerson) =
var b: TPerson
b = a[]
b.name = "Bob"
a[] = b
```
</td>
<td><b>Dereference.</b><i>In C, only the pointer to the strings in the struct is copied. In Nimrod, the string is also copied, but refs are not deep-copied.</i></td>