lua-users home
lua-l archive

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


Miles Bader wrote:

I'm very much in favor of "direction-oriented" shift/rotate operators,
even if the implementation actually just looks like:

   function left_shift (val, count) ... end
   function right_shift (val, count) return left_shift (val, -count) end

It would make code using such operators much easier to read.

Then I guess we might need to add the alshift() function ....

Ralph