View Full Version : Lape
Footy
08-11-2012, 03:13 PM
I've heared about this around the forums, and I have a few questions:
1: What exactly is LAPE? A new language?
2: If it is a new language, how different is it from pascalscript?
3: What will the transition be like? All pascalscripts moved to outdated? Slow transitition like reflection - color? Or will both exist?
Thanks in advance!
masterBB
08-11-2012, 03:17 PM
A few things will be different. But lape is already implemented into simba. Just set the interpreter to lape.
script -> interpreter -> lape
Srl doesn't work with lape, so there is a srl-lape version.
Brandon
08-11-2012, 03:21 PM
It's actually the same as what we have now.. Slight difference in syntax, can be made case sensitive if you like..
Pointers are allowed. Infact, I'm currently experimenting with it too. It's basically full blown pascal backend rather than pascal script. You have more data types, etc.
Thus sometimes there can be byte problems, etc.. but aside from that, you can literally do what you currently do + more.
Example you can do:
{$loadlib GLHook}
type Compass = record
Found: Boolean;
VertexCount: Integer;
VX, VY: Array [0..4] Of Single;
DegreeAngle: Single;
RadianAngle: Single;
end;
type pComp = ^Compass;
var
Ptr: Pointer;
Comp: pComp;
begin
ClearDebug;
Ptr := GLHTest;
PComp := Ptr;
writeln(PComp^.VertexCount);
end.
That's pointer arithmentics there inorder to access a class via a pointer to it. Where type Pointer = void*.
Now that's a bit complicated for an explanation but you don't have to actually use that. It's the same as what you currently use.
Just an example.
Footy
08-11-2012, 03:26 PM
It's actually the same as what we have now.. Slight difference in syntax, can be made case sensitive if you like..
Pointers are allowed. Infact, I'm currently experimenting with it too. It's basically full blown pascal backend rather than pascal script. You have more data types, etc.
Thus sometimes there can be byte problems, etc.. but aside from that, you can literally do what you currently do + more.
Example you can do:
{$loadlib GLHook}
type Compass = record
Found: Boolean;
VertexCount: Integer;
VX, VY: Array [0..4] Of Single;
DegreeAngle: Single;
RadianAngle: Single;
end;
type pComp = ^Compass;
var
Ptr: Pointer;
Comp: pComp;
begin
ClearDebug;
Ptr := GLHTest;
PComp := Ptr;
writeln(PComp^.VertexCount);
end.
That's pointer arithmentics there inorder to access a class via a pointer to it. Where type Pointer = void*.
Now that's a bit complicated for an explanation but you don't have to actually use that. It's the same as what you currently use.
Just an example.
Thanks for the informative post! I think I understand most of it.
Nebula
08-11-2012, 06:43 PM
Read this for more
http://blog.wizzup.org/blog/lape#id69
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.