PostIncrement not supported?


#1

I’m just learning ChaiScript and investigating what is possible.

I have

chai("var i;for (i = 0;i < 5; i++ ) {test(i);}");

which gives me an error " Incomlete prefix ‘+’ "

but

chai("var i;for (i = 0;i < 5; ++i ) {test(i);}");

is fine.

Is this right, or am I doing something wrong?

Thanks

P.S. I am a noob


#2

Correct, post-increment is not supported. It’s harder to parse and we concluded early that there’s almost no reason to have it.

I did investigate adding it, but have not yet.

-Jason


#3

Whew! Thanks! Thought it was me :slight_smile: