yyyyyyyan / rockstar-py

Python transpiler for the esoteric language Rockstar
MIT License
95 stars 26 forks source link

Error upon using inputted value as number #24

Open JWinslow23 opened 6 years ago

JWinslow23 commented 6 years ago

After running a primality tester written in Rockstar, the generated file is erroring on this line (the_storm is in inputted value): if the_storm <= a_pair * a_pair: TypeError: '<=' not supported between instances of 'str' and 'int' This seems to be because Python is treating the_storm as a string instead of an int.

yyyyyyyan commented 6 years ago

That's because weak typing is not oficially supported yet, according to rockstar specks. However, I'm going to solve that based on this PR. Thanks for pointing it out!

JWinslow23 commented 6 years ago

For the moment, I've made a tweak to my personal copy of it by making it cast to an int if possible.