You are not logged in.
Pages: 1
Alright, here's one that's been floating around in my head for a while...
On the official PascalScript pages at RemObjects, they have (as far as I could see) two brief articles showing off some of PascalScripts abilities. According to the second of these articles, it seems like it ~should~ be able to handle the creation of user-created classes and objects. I'm having trouble getting this working, though... I keep seeming to generate errors.
Could someone potentially enlighten me as to what I'm doing wrong with this simple example?
type
THelloWorld = class
procedure Put;
end;
procedure THelloWorld.Put;
begin
ShowMessage('Hello, World!');
end;
var
HelloWorld: THelloWorld;
begin
HelloWorld := THelloWorld.Create;
HelloWorld.Put;
HelloWorld.Free;
end.
This code generates an "identifier expected" error on line 2... But alternately, if we change THelloWorld into an integer, and dump out the "THelloWorld.put" procedure, the error "Class type expected"... which seems like it ~should~ be able to handle classes somehow.
Offline
Pascal Script can only import and use class definitions, but it cannot compile new classes. The article that you are probably referring to is: PS02 - Using Classes with RemObjects PascalScript - describes how to import and use classes.
On the good side, there isn't anything that can be done with classes and cant be done without them!
Offline
Pages: 1