Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.






Epoch: Structure definitions get an overhaul

Posted by ApochPiQ, 21 February 2012 · 584 views

Epoch Syntax
Instead of working on changing variable initialization syntax (which is hard) I decided to make structures work again in the R12 compiler, which turned out to be more or less just as hard.

The results are pleasing, though:

structure outer :
	 integer foo,
	 inner bar

structure inner :
	 string baz,
	 string quux

structure test :
	 integer foo,
	 string bar,
	 (func : integer -> string),
	 (voidfunc : )

Overall, I'm pretty happy with this.

Next I promise I'll work on variable initialization. Here's a preview of what I want it to look like:

structure complex :
     real RealPart,
     real ImaginaryPart

entrypoint :
{
     integer foo = 42
     complex i = 0, 1
     print(i * i)          // in a special world with custom operator overloads, prints -1
}





print(i * i)          // in a special world with custom operator overloads, prints -1

Shouldn't that print like -1, 0 or perhaps <-1, 0> just to be sane
Pedantry. :-P

November 2014 »

S M T W T F S
      1
2345678
9101112131415
16171819202122
23 242526272829
30      

Recent Comments

PARTNERS