lua-users home
lua-l archive

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


Message: 7
Date: Wed, 29 Aug 2012 12:17:09 +0800
From: "=?ISO-8859-1?B?UVFTWmVyby4h?=" <80444274@qq.com>
Subject: Format Question
To: "=?ISO-8859-1?B?bHVhLWw=?=" <lua-l@lists.lua.org>
Message-ID: <tencent_4B86E93528C3B6341CAD3353@qq.com" target="_blank" style="outline: none; cursor: pointer; color: rgb(153, 51, 0); font-family: 'lucida Grande', Verdana; line-height: 23px; ">tencent_4B86E93528C3B6341CAD3353@qq.com>
Content-Type: text/plain; charset="iso-8859-1"

Why 5.1 support negative and 5.2 do not support negative operating it?


Lua 5.2.1  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> string.format("%X",-1)
stdin:1: bad argument #2 to 'format' (not a non-negative number in proper range)

stack traceback:
        [C]: in function 'format'
        stdin:1: in main chunk
        [C]: in ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://vlists.pepperfish.net/cgi-bin/mailman/private/lua-l-lists.lua.org/attachments/20120829/f3c6c2af/attachment-0001.html

Private files can not be opened