This website works better with JavaScript.
Home
Explore
Help
Sign In
piumarta
/
javascrypt
mirror of
https://github.com/mtardy/javascrypt.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
1
Wiki
Activity
Browse Source
Print error in case of non-integer in arithmetic operation
pull/5/head
mtardy
4 years ago
parent
566b88dec1
commit
2128d6abf9
1 changed files
with
4 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-0
object.c
+ 4
- 0
object.c
View File
@ -177,6 +177,10 @@ void println(oop ast);
int
getInteger
(
oop
obj
)
{
if
(
!
isInteger
(
obj
)
)
{
fprintf
(
stderr
,
"
\n
Non-integer in arithmetic expression
\n
"
)
;
exit
(
1
)
;
}
#
if (USE_TAG)
return
(
intptr_t
)
obj
>
>
1
;
#
else
Write
Preview
Loading…
Cancel
Save