IonicWind Software

Aurora Compiler => General Discussion => Topic started by: Parker on January 16, 2006, 12:04:15 AM

Title: Change the "this" keyword
Post by: Parker on January 16, 2006, 12:04:15 AM
This is a funny thing I discovered a while ago, the ability to change the "this" keyword in the compiler. You have to open acparse.exe in the IDE, search for "this" (find the lowercase one, not the "This program cannot...") and change it to "darn". Then in a new program, write this:
class test
{
int a;
declare m();
}
test::m()
{
*(test)darn.a = 1;
}

The code compiles without a problem :)

I just thought it was funny, but I don't recommend keeping that, you could break the compiler and you'd have to reinstall. Change it back to "this" when you're done, otherwise you'll get some "undefined variable: this" errors.
Title: Re: Change the "this" keyword
Post by: Ionic Wind Support Team on January 24, 2006, 12:04:54 AM
You would definately break the compiler doing things like that ;)

Speaking of 'this'.   It is now typed so no more type casting will be needed in the next update.

*(lexer)this.Blah() can now be expressed as this->blah();
Title: Re: Change the "this" keyword
Post by: Parker on January 24, 2006, 08:30:37 AM
Yes, I figured out that if you're replacing variables they have to be the exact same length as before. I just think it's funny that it's possible. I always make a backup copy though before I try anything like that.