Welcome, Guest
Username: Password: Remember me
Components and Libraries for Scripting Development, discussions, problems and suggestions
  • Page:
  • 1
  • 2

TOPIC:

Compiler broken for array datatypes 8 years 4 months ago #8559

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
Hello,
I've just noticed that Pascal Script engine is no more able to read arrays in version CT5.5, last tested in CT4.7 were it was working out of the box.
Thanks.

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 4 months ago #8560

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
I've just prepared this sample project to verify the bug

File Attachment:

File Name: testapp.zip
File Size:48 KB
Attachments:

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 4 months ago #8563

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Thanks Sir
we will test and report
PilotLogic Architect and Core Programmer
The following user(s) said Thank You: universe

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 4 months ago #8572

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
Thanks, I think I found another bug, maybe they are related, the sample project attached on CT5.5 raises exception at function test2.
By the way I replaced the pl_PascalScript of CT5.5 by the same in CT4.7 but the problem remains, do I have to rebuild the IDE, or the bug is in FPC itself?

File Attachment:

File Name: testapp.7z
File Size:8 KB
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by universe. Reason: grammar :)

Compiler broken for array datatypes 8 years 4 months ago #8573

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Sir
we want more time for testing... :)
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 4 months ago #8574

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
Ok sorry :)

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 3 months ago #8710

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
The bug still exists in the latest CT5.6 build

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 3 months ago #8734

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8

Sternas Stefanos wrote: Sir
we want more time for testing... :)


The problem still exists in the latest release 5.6

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 3 months ago #8735

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
Any feedback about this? Do I have to stay with CT4.7!!!

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 3 months ago #8736

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Sir we test pl_PascalScript
with CodeOcean small IDE sample
C:\codetyphon\CodeOcean\PascalScript\samples\a_small_ide

and we don't find any problem with test scripts
C:\codetyphon\CodeOcean\PascalScript\samples\a_small_ide\scripts

We don't know the "logic" of your app
CT 4.7 it's to old version
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Compiler broken for array datatypes 8 years 3 months ago #8737

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
There's nothing strange in the logic of my application, declaring custom array types and then calling them, something was broken and sure there will be other complaints for advanced projects in the future if it won't be fixed. The problem is the compiler, I'll try to test with the latest lazarus release with FPC 3.0 and report back.

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 3 months ago #8738

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
There is no access violation and the message window is shown with Lazarus 1.6 and FPC3.0, but values are wrong and program enters infinite loop (Length of vector not working), as I guessed it's a compiler problem.

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 3 months ago #8739

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Sir
a) my opinion and our lab test show
that CT-FPC is more stable from FPC 3.0

b) please make a script to test with
C:\codetyphon\CodeOcean\PascalScript\samples\a_small_ide

like this
Program IFSTest;
type
  TArrayOfString = array of String;

procedure Test(x: TArrayOfString);
var
  i: integer;
begin
  for i := 0 to Getarraylength(X) -1 do
  begin
     writeln(x[i]);
  end;
end;
var
  temp: TArrayOfString;

Begin
  setarraylength(temp, 2);
  temp[0] := 'Test1';
  temp[1] := 'Test2';
  test(temp);
End.

this sample work OK on 8 OSes
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Compiler broken for array datatypes 8 years 3 months ago #8740

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
Thanks for your suggestion, I'll test and report, meanwhile I reported to the lazarus forum and maybe I'll report to FPC.

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 3 months ago #8741

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
Well, the way you suggested the script will be too big (with my real program) and I want to keep things simple in the script, so I need to hide some parts and make function calls as I did, anyway thanks for the point.

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 3 months ago #8742

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Finally array types work for you in CT 5.6?
I can post screens from any OS you like.
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Compiler broken for array datatypes 8 years 3 months ago #8743

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
The script you provided earlier works fine, but I can't use it as it will make the script too big in the real program.

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 3 months ago #8744

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
After doing a lot of tests I found the bug exits only in Lazarus 64 bit versions, and the program works as expected with Lazarus 1.4 x86 with FPC 2.6.2 and with Lazarus 1.6RC1 with FPC 3.0.

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 3 months ago #8745

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
Yes Sir
but here is not Lazarus Forum...
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Compiler broken for array datatypes 8 years 3 months ago #8746

  • universe
  • universe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
Sure, I wanted to give you some guides for comparison, as it could give you some hints if the bug is only in Lazarus 64bit version while with CT is in the 32 bit version (I didn't test the 64bit yet), I talk Object Pascal at last.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2