FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

October 18th -- Characters, fixed indexing, fixed multi-ret

 
Post new topic   Reply to topic     Forum Index -> MiniD
View previous topic :: View next topic  
Author Message
JarrettBillingsley



Joined: 20 Jun 2006
Posts: 457
Location: Pennsylvania!

PostPosted: Wed Oct 18, 2006 9:43 pm    Post subject: October 18th -- Characters, fixed indexing, fixed multi-ret Reply with quote

Damn, all these programming projects for school really eat into your programming projects for fun..!

Anyway, I changed indexing codegen. I hope that it works properly in all cases now. I got so fed up with it that I just said "forget it" and made some kludges, and now it all works nicely. It's awful, I know. But I don't want to deal with indexing. Ever. Again.

New: a new 'character' datatype, for various reasons. The integer/character duality of the int type was just too ugly in some cases. Having a proper character type makes things like:

Code:
local s = 'a' ~ 'b'; // yields string "ab"
local str = 'c' ~ "at"; // yields "cat"


Possible, as well as making some library functions a lot more obvious what they expect.

You can also still switch on characters, so

Code:
switch("hello"[4])
{
    case 'o': ...
}


Works fine. Also notice the indexing of a string -- right now it's provided through an opIndex in the string type metatable, but I think I'll implement it natively.

Lastly, there was a bug with multiple returns where they just didn't work. So if you returned the value of a function, the caller would get nothing back. Now they work.

Oh and I started the math standard lib, but it's just got rand() right now.

I'm getting really excited about how MiniD is starting to look and act. It's starting to feel more like my own language than a derivative of Lua.

[Edit]Oh, there's also a little makefile in the repo which should hopefully be a little more enlightening than the batch file for how to build test.exe. I have to port it to *nix, but at least it's there. It's not as makefile-y as I'd like it though, because due to Bug 282, the compilation has to be done in a very specific way to avoid DMD throwing really stupid errors.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> MiniD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group