lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

2015-03-28 7:23 GMT-07:00 Luiz Henrique de Figueiredo <>:
> -->    rb = b + base;
> Should the line marked by arrow not be following?
>        rb = base + b

In C, p+n and n+p are the same, even if p is a pointer and n is an int.

Side note, you can write legally either

rb = base[b];


rb = b[base];

in C, even "b" is a literal constant.