lua-l archive
[
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
: Mon, 20 Jun 2022 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