[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Integer division
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 14 Nov 2012 11:24:03 +0200
2012/11/14 spir <denis.spir@gmail.com>:
> If there ever is an int div without quotient, the sign '//' looks fine as
> well (indeed, '\' is unavailable).
Not sure about that: in Lua it is used only inside string constants.
Outside, that, not even backslash-newline has any special meaning.
You get messages as for any other syntax error, like:
lua: xxx.lua:1: 'do' expected near '\'
But I hate `\` for integer divide, since Matlab/Octave (which I use
often) uses it for a different purpose, and it carries just too much
escape-character baggage everwhere else.
If nobody loves `/%` (think `/` and `%` at the same time and stare
at it for a minute; it grows on you), I'll acquiesce in `//`.