lua-users home
lua-l archive

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


Hi,

Shouldn't rawset use it's second and third parameter as the new desired key and value respectively?


Consider the following:

Lua 5.0.2  Copyright (C) 1994-2004 Tecgraf, PUC-Rio
> t={}
> rawset(t,1,2,3,4)
> print(next(t))
3       4
>

Please note that I already avoid this problem by enclosing the third parameter with parenthesis, and I just created this email because the manual says that rawset uses the 2nd and 3rd parameters, and not n-2 and n-1 (I was experiencing 'strange' behavior while using the 3rd parameter as the result of string.gsub, which returns the new string plus the number of substitutions made).


Sorry if this has already been discussed, but I couldn't find any related mail with keywords 'rawset' and 'bug' (the best match was a "4.0 Buglist" back 2002, but was about seg. fault when calling raw[gs]et with extra arguments).



Best regards,
Romulo.