JYP#!, a new compiler.
Root / Talk About Programs / [.]
joelableCreated:
As if we didn't already have too many compilers, here's another one for you. No download just yet, I just wanted to inform some people who might care about this little project. And maybe get some feedback and recommendations. Here's my progress so far:
COMMANDS
BeginCode is needed to start compiling, needed at the top of your program.
EndCode is to end the compiling. Leaves a nice little comment at the end of your program.
Disp is basically just print.
Pause is basically just wait.
--- is used for comments. Anything after this will not be compiled and turned into comments.
.. is used for joining two strings and things for printing. This doesn't work for concatenating, you still need to use +.
Function is basically just def.
Restart begins the code all the way from the beginning.
Strict is basically just option sctrict.
Import makes the following text be immune to compiling until the next line. Can be used for doing stuff that the compiler would mess up, like Display.
InputButton is used for getting button input and assigning the data to a variable, like InputButton BUTTON#. Adding a tag to the end of the command will make the command behave differently. Tags are <Held>, getting information while the button is pressed, <Pressed>, getting information the instant the button is pressed, and <Released>, getting the information from the instant the button is released. For example; InputButton<Pressed> buttonpressed#.
Install will install a definition into your code, so it can be called like a function. At the moment, there is only ReadButton()
Prepare is a mere replacement for XON.
INSTALLATIONS
ReadButton gets the character from a button code. For example, 16 give you the A symbol.
EXAMPLE CODE
BeginCode
lol#=0
Install ReadButton()
while lol#==0
InputButton<Pressed> lol#
wend
Disp "You pressed "..ReadButton(lol#)
Pause 10
Restart
EndCode
There's more to come! (maybe lol)
So making compilers in SB is the new petit compter OS?yes being real, compilers are better than oss because whod would open smilebasic just to use an os? not even to mention that anything made in smilebasic is pretty limited, so oss would suck pretty bad. compilers are easy to make and much more usable than oss.
Yeah, definitely more useable and useful.So making compilers in SB is the new petit compter OS?yes being real, compilers are better than oss because whod would open smilebasic just to use an os? not even to mention that anything made in smilebasic is pretty limited, so oss would suck pretty bad. compilers are easy to make and much more usable than oss.