BenMcLean Posted August 1, 2014 Share Posted August 1, 2014 (edited) I love Batari Basic. Am working on my first game and it's gonna rock. There is one suggestion I would make about improving the Batari Basic language. It would only require changes to the parser, not the compiler. The idea is that it would be really cool if I could say something like this: a=7 function wut(in) { in{7} || in{5} } if wut(a) then COLUBK = $02 That would get translated by the parser into this: a=7 if a{7} || a{5} then COLUBK = $02 before going on to be compiled just like Batari Basic programs are now. That way, you could abstract all of your bitwise operations or other complicated conditions into one section of code, and only have to change them one place in your code to change them. Heck, if I was really determined, I could write a Python script for this. It could make code easier to read while at the same time making it easier to scrape together the use of every last bit in those 26 bytes of RAM. You'd be able to see statements like, "if isHeDead(badguy) then blah" instead of "if badguy{0} = 0 then blah" Some other keyword like "expression" could be used instead of "function" if that's better. It wouldn't change things on the assembly end at all. Heck, running a python script on your code before it gets to the batari basic tools could do this. What do you think? Is there some technical reason why Batari Basic can't be expanded to include this which I haven't thought of? Edited August 1, 2014 by BenMcLean Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted August 1, 2014 Share Posted August 1, 2014 Could you fudge it with some use of the def or macro features? http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#def http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#macro 2 Quote Link to comment Share on other sites More sharing options...
BenMcLean Posted August 1, 2014 Author Share Posted August 1, 2014 Could you fudge it with some use of the def or macro features? http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#def http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#macro Essentially, what I was thinking of here already exists! I just didn't know what it was called. Well, this is wonderful. Thanks. How can I delete this thread? Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted August 1, 2014 Share Posted August 1, 2014 How can I delete this thread? Deleting the thread wouldn't help other people with a similar question. Quote Link to comment Share on other sites More sharing options...
BenMcLean Posted August 1, 2014 Author Share Posted August 1, 2014 Deleting the thread wouldn't help other people with a similar question. Oh, so you think my question was good then eh? Well that's a relief. I thought the fact that this already existed meant I was wasting everybody's time by bringing it up. Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted August 1, 2014 Share Posted August 1, 2014 Oh, so you think my question was good then eh? Well that's a relief. I thought the fact that this already existed meant I was wasting everybody's time by bringing it up. There are no stupid questions: just stupid answers. Quote Link to comment Share on other sites More sharing options...
BenMcLean Posted August 2, 2014 Author Share Posted August 2, 2014 (edited) Even though this exists, my experience in trying to use it today seems to have demonstrated that it's implementation is flawed because I've produced code that passes the syntax checker in Visual Batari Basic but which crashes the compiler for no apparent reason while removing the DEF statements makes my program compile and run fine. Edited August 2, 2014 by BenMcLean Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted August 2, 2014 Share Posted August 2, 2014 Even though this exists, my experience in trying to use it today seems to have demonstrated that it's implementation is flawed because I've produced code that passes the syntax checker in Visual Batari Basic but which crashes the compiler for no apparent reason while removing the DEF statements makes my program compile and run fine. Dunno what's happening without seeing the yadayada.bas file, dawg. Double check that you're using the latest version of bB too: http://atariage.com/forums/topic/214909-bb-with-native-64k-cart-support-11dreveng/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.