3.13.2011

It's getting better all the time

Implemented EQUAL and now I can perfectly create some small programs for output values and strings. But I had to rethink the way my macros differentiate between evaluation BEFORE macro call or evaluating AFTER the macro call. That's a big problem, especially for IFs. Using only one IF syntax, I was able to decide between one of them, so I implement a whopping total of eight different IF macros. Why so many? Well, an IF takes three parameter: condition, macro on true, macro on false. So, how do you insert them? Right, using a little sequence of three characters signaling whether to evaluate them before ("E") or call them explicitely ("C"). It seems right to do so cause it enables you write IF_CEE(CALL_ME_FOR_CONDITION,"true","false) as well as IF_ECC(EQUAL(4,5),MACRO_ON_TRUE,MACRO_ON_FALSE) - you won't need to always write a new macro or always evaluate all expressions. Of course, evaluation before does not guarantee you this, as it get's evaluated before. However, this enables me seperate more complex operations but insert smaller ones with so many supertiny macros.

I think this little macro collections needs his own place and name... It's small but very useful when used carefully and correctly. You can't just catch errors like a normal problem, all is based on whether you know what to insert and how it connects to other stuff etc. Quite complicated without any knowledge about it, but it should be quite easy to manage for peeps not use to intense macro-ing. Only thing bothering me is the fact that I'll need to prefix it one day... It looks ugly writing code this way. But as I said, I'll add the prefixes later when I finished almost anything I'll need. It's OK to use it if it's finished, but as long as most stuff isn't final, I don't think it's necessary to do so. Next step would be adding the call indicators to all other macros (not only if) and start to implement bool-controlled for loops and maybe tackle a division later. Let's see where this is going - but at first I need to get some sleep....

Those... "elementary things" make me quite exhausted from time to time. Especially if it's something so fundamental like what I'm doing at the moment. Oh and maybe I can also get rid of the FINF macro I use for subtraction...

No comments: