0 Members and 2 Guests are viewing this topic.
StructDef Kitty 1:15 .add element 0 to be 8 bit char with value of $0F 2:6000 .el. 1 is a 16 bit int with value of 6000 8:"Hellolol" .el 2 is pointer to a string with an actual valueEnd
StructDef Kitty 1 2 8End
Disp Struct(A,Kitty,2) .disp string stored in element two of structure A
Thanx!Where to find a list of the hexadecimal character codes?
lambda(Pt-on(r1,r2,r3):Pt-on(r1,r2+8,r3+8)) -> A
lambda(Pt-on(r1,r2,r3):Pt-on(r1,r2+8,r3+8)) ->A
In other news, Frey continues kicking unprecedented levels of ass.
In addition to structs, another nice feature would be expression continuation over multiple lines. Take this for example:Code: [Select]lambda(Pt-on(r1,r2,r3):Pt-on(r1,r2+8,r3+8)) -> AIt would be nice if when a line ends with a colon, the expression isn't closed at the end of the line, but rather continued on the next one:Code: [Select]lambda(Pt-on(r1,r2,r3):Pt-on(r1,r2+8,r3+8)) ->AI'm finding myself writing long lambdas ATM for TaN (don't yell at me for making it Axe based again, I only did it because the new functional features make life so much easier considering enemies), some of which take dozens of lines. This addition would be very helpful
Quote from: Ashbad on July 14, 2011, 10:10:52 amIn addition to structs, another nice feature would be expression continuation over multiple lines. Take this for example:Code: [Select]lambda(Pt-on(r1,r2,r3):Pt-on(r1,r2+8,r3+8)) -> AIt would be nice if when a line ends with a colon, the expression isn't closed at the end of the line, but rather continued on the next one:Code: [Select]lambda(Pt-on(r1,r2,r3):Pt-on(r1,r2+8,r3+8)) ->AI'm finding myself writing long lambdas ATM for TaN (don't yell at me for making it Axe based again, I only did it because the new functional features make life so much easier considering enemies), some of which take dozens of lines. This addition would be very helpful You could just write the function as a subroutine and then deference the pointer to the subroutine.
By the way, I should mention that lambda currently produce 3 extra bytes of code compared to using regular label names. Label names are also neater and allow more flexibility with code. Lambdas are meant to be used as expressions, that is, they take in arguments and return a value. This could maybe optimize better in the future. Also, using variables as single byte values is less optimized than if you had just used the 2 byte form, at least until I can optimize in some 8-bit math.