[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Numeric for loop with rationals
- From: Francisco Olarte <folarte@...>
- Date: Tue, 30 Jan 2018 16:54:37 +0100
On Tue, Jan 30, 2018 at 2:08 PM, Soni "They/Them" L. <fakedme@gmail.com> wrote:
...
> We can argue about this all day but if I can do, in C++
>
> for (type i = min; i < max; i += step) {
> }
>
> Why can't I do
>
> for i=min,max,step do
> end
>
> in Lua? They should be equivalent.
Why should they?
In fact you cannot do the upper thing alone, you'll need some more
code. And you can do "int main(int ac, char **av ) {...." in C and not
in lua.
But, if you are thinking on counting loops, you can do it in both,
with any "countable" type. Lua just happens to have an streamlined
version for it's built in numbers.
Francisco Olarte.
- References:
- Numeric for loop with rationals, Soni "They/Them" L.
- Re: Numeric for loop with rationals, dyngeccetor8
- Re: Numeric for loop with rationals, Soni "They/Them" L.
- Re: Numeric for loop with rationals, dyngeccetor8
- Re: Numeric for loop with rationals, Soni "They/Them" L.
- Re: Numeric for loop with rationals, Francisco Olarte
- Re: Numeric for loop with rationals, Soni "They/Them" L.
- Re: Numeric for loop with rationals, Dirk Laurie
- Re: Numeric for loop with rationals, Soni "They/Them" L.
- Re: Numeric for loop with rationals, Dirk Laurie
- Re: Numeric for loop with rationals, Soni "They/Them" L.