core: all int is now num

This commit is contained in:
2023-06-18 20:03:27 +02:00
parent 1b878db8fe
commit 85a5b567b2
8 changed files with 31 additions and 27 deletions

18
src/aton.🗿 Normal file
View File

@ -0,0 +1,18 @@
aton(str)
{
local i = 0;
local out = 0;
loop {
if ([str + i] != '+')
break;
i++;
}
loop {
if ([str + i] == 0 | isdigit([str + i]) == 0)
break;
out = out * 10 + [str + i] - '0';
i++;
}
return out;
}