Adds newline for character literal

This commit is contained in:
Grzegorz Adam Hankiewicz 2014-01-12 09:18:35 -08:00
parent 254d1ec410
commit 39b3a57422
1 changed files with 17 additions and 0 deletions

View File

@ -140,6 +140,23 @@ s[11] = '!'
<tr>
<td>
```C
char a = '\n';
printf("byte %d\nA%cB\n", a, a);
```
</td>
<td>
```Nimrod
let a = '\L'
echo "byte ", $int(a), "\nA" & $a & "B"
```
</td>
<td><b>Newlines and chars</b>. In nimrod you can't use ``\n`` as a character literal, because on the Windows platform it expands to CR+LR. So you need to specify which char to use.</i>
</td>
</tr>
<tr>
<td>
```C
9 % 8 // 1
-9 % 8 // -1
(unsigned)(-9) % (unsigned)(8) // 7