I tried to make a custom record type in order to store information of a product and call it in functions and procedures when needed. The code is written in a script compiler of a Delphi based ERP program. The problem I'm facing is that I get a syntax error on the record type definition when I execute the script. I searched the internet for an hour or so, but wasn't able to find a solution. My script is as next:
Unit Paneelwand;
interface
Uses System, Classes, DB, SysUtils, Graphics, Types;
type
TPanel = record
Ref, PType : string;
Width, Heigth, Thickness, PriceSheets, PriceBitum, PriceHardboard, PricePermmFrameWidth, PricePermmFrameHeigth : float;
end;
implementation
//rest of the code
The syntax Error is on line 6 "TPanel = record". I can't find what I did wrong. Please, help?
By the way: the script is saved as a .psc file and referenced to in another script with its filename as a reference in the uses section. This works fine with other scripts I wrote. I also never had to add a unit line as the scripts are called by the file names. I updated the script, by deleting the part that is not part of the problem and added the changes that were suggested below by the great people that try to help me. However, the error remains on the same line --> 'TPanel = record;'.
"Type" is reserved word. try other word