Show: Delphi C++
Display Preferences

E2573 Illegal value for the ALIGN directive (valid for one of 1, 2, 4, 8 or 16) (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Error and Warning Messages (Delphi)

This occurs when you set the align directive to a value that is not in 1, 2, 4, 8, or 16.


program E2573;

{$APPTYPE CONSOLE}

uses
  SysUtils;

{$ALIGN 3}
type
  TAlignedRecord = Record
    name1   : string[4];
    floater : single;
    name2   : char;
    int     : Integer;
  end;
var
  alignedRec  : TAlignedRecord;
begin
   Writeln('Aligned record size = '+IntToStr(SizeOf(alignedRec)));
   readln;
end.
Personal tools
In other languages
Previous Versions
Assistance