lua-users home
lua-l archive
Re: How determine data type used in function argument?
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
Re: How determine data type used in function argument?
From
: Philippe Verdy <verdyp@
...
>
Date
: 2022年6月20日 15:45:25 +0200
function incr(n)
if type(n) == "string"
n = tostring(tonumber(n) + 1;
elseif type(n) == "number"
n = n + 1;
else
print type(n);
end
end
References
:
How determine data type used in function argument?
,
Budi
Prev by Date:
How determine data type used in function argument?
Next by Date:
Re: How determine data type used in function argument?
Previous by thread:
How determine data type used in function argument?
Next by thread:
Re: How determine data type used in function argument?
Index(es):
Date
Thread
AltStyle
によって変換されたページ
(->オリジナル)
/
アドレス:
モード:
デフォルト
音声ブラウザ
ルビ付き
配色反転
文字拡大
モバイル