mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-09-12 08:59:25 +02:00
* Compiler can now handle initialized arrays with enums (patch from Mattias)
This commit is contained in:
parent
9ef47345a8
commit
47aa8d9351
@ -90,7 +90,7 @@ type
|
|||||||
|
|
||||||
|
|
||||||
{ integer math exceptions }
|
{ integer math exceptions }
|
||||||
EInterror = Class(EExternal);
|
EIntError = Class(EExternal);
|
||||||
EDivByZero = Class(EIntError);
|
EDivByZero = Class(EIntError);
|
||||||
ERangeError = Class(EIntError);
|
ERangeError = Class(EIntError);
|
||||||
EIntOverflow = Class(EIntError);
|
EIntOverflow = Class(EIntError);
|
||||||
@ -363,9 +363,9 @@ const
|
|||||||
{ True=Leapyear }
|
{ True=Leapyear }
|
||||||
|
|
||||||
Var
|
Var
|
||||||
MonthDays : array [Boolean] of TDayTable;
|
MonthDays : array [Boolean] of TDayTable =
|
||||||
// ((31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31),
|
((31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31),
|
||||||
// (31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31));
|
(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31));
|
||||||
ShortMonthNames : TMonthNames = (
|
ShortMonthNames : TMonthNames = (
|
||||||
'Jan',
|
'Jan',
|
||||||
'Feb',
|
'Feb',
|
||||||
@ -3674,30 +3674,6 @@ end;
|
|||||||
|
|
||||||
initialization
|
initialization
|
||||||
FormatSettings := TFormatSettings.Create;
|
FormatSettings := TFormatSettings.Create;
|
||||||
MonthDays[True][1]:=31;
|
|
||||||
MonthDays[True][2]:=29;
|
|
||||||
MonthDays[True][3]:=31;
|
|
||||||
MonthDays[True][4]:=30;
|
|
||||||
MonthDays[True][5]:=31;
|
|
||||||
MonthDays[True][6]:=30;
|
|
||||||
MonthDays[True][7]:=31;
|
|
||||||
MonthDays[True][8]:=31;
|
|
||||||
MonthDays[True][9]:=30;
|
|
||||||
MonthDays[True][10]:=31;
|
|
||||||
MonthDays[True][11]:=30;
|
|
||||||
MonthDays[True][12]:=31;
|
|
||||||
MonthDays[False][1]:=31;
|
|
||||||
MonthDays[False][2]:=28;
|
|
||||||
MonthDays[False][3]:=31;
|
|
||||||
MonthDays[False][4]:=30;
|
|
||||||
MonthDays[False][5]:=31;
|
|
||||||
MonthDays[False][6]:=30;
|
|
||||||
MonthDays[False][7]:=31;
|
|
||||||
MonthDays[False][8]:=31;
|
|
||||||
MonthDays[False][9]:=30;
|
|
||||||
MonthDays[False][10]:=31;
|
|
||||||
MonthDays[False][11]:=30;
|
|
||||||
MonthDays[False][12]:=31;
|
|
||||||
RTLEInvalidCast:=EInvalidCast;
|
RTLEInvalidCast:=EInvalidCast;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user