c3lang / c3docs-old

Docs for the C3 language
http://www.c3-lang.org
10 stars 15 forks source link

'for loop' docs #1

Closed PavelVozenilek closed 5 years ago

PavelVozenilek commented 5 years ago

On page https://c3lang.github.io/c3docs/examples/ it says:

the for-loop is the same as C99

Does that mean support for C features like:

for (int x = 1, y = 2; x < 10; ++x, y += 2) { ... }

Comma operator was said to be removed from the language. For could be made simpler, too.

lerno commented 5 years ago

In fact it goes further than C99. This is valid:

for (int i = 0, Foo foo = { 3 }, Bar bar; i < foo.i; i++, bar.x = test()) { ... }
lerno commented 5 years ago

This does not appear to be an issue, so I close it.