< Extension:Scribunto

This page documents changes in Lua 5.2 that may be of interest to those writing code for Lua 5.1. These may cause problems for reusers using Scribunto in unsupported configurations, and may be problematic if Scribunto is ever changed to use Lua 5.2 or later.

Known issues

IssueReplacement
string.gfind deprecated in 5.1, removed in 5.2Renamed to string.gmatch
math.log10 deprecated in 5.2In 5.2, use math.log with base 10
math.mod deprecated in 5.1, removed in 5.2Renamed to math.fmod
table.maxn deprecated in 5.2No replacement
table.getn deprecated in 5.1, removed in 5.2Use the length operator # instead
automatic arg variable in varargs function deprecated in 5.1, removed in 5.2Use the varargs operator ... instead
tonumber only works with integers when base 10 is explicitly specified in 5.2If non-integers need to be recognized, specify nil or omit the base
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.