mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:29:32 +02:00
* removed warnings
This commit is contained in:
parent
157011cc0a
commit
3db89ed4f1
@ -44,7 +44,7 @@ end ;
|
||||
|
||||
function DoEncodeTime(Hour, Minute, Second, MilliSecond: word): longint;
|
||||
begin
|
||||
If ((hour>=0) and (Hour<24)) and
|
||||
If ((hour>=0) and (Hour<24)) and
|
||||
((Minute>=0) and (Minute<60)) and
|
||||
((Second>=0) and (Second<60)) and
|
||||
((MilliSecond>=0) and (Millisecond<1000)) then
|
||||
@ -81,7 +81,7 @@ end ;
|
||||
function MSecsToTimeStamp(MSecs: comp): TTimeStamp;
|
||||
begin
|
||||
result.Date := trunc(msecs / msecsperday);
|
||||
msecs:= msecs - result.date * msecsperday;
|
||||
msecs:= msecs - comp(result.date * msecsperday);
|
||||
result.Time := Trunc(MSecs);
|
||||
end ;
|
||||
|
||||
@ -225,7 +225,7 @@ end ;
|
||||
function IncMonth(const DateTime: TDateTime; NumberOfMonths: integer): TDateTime;
|
||||
var Year, Month, Day: word;
|
||||
S : Integer;
|
||||
|
||||
|
||||
begin
|
||||
If NumberOfMonths>=0 then s:=1 else s:=-1;
|
||||
DecodeDate(DateTime, Year, Month, Day);
|
||||
@ -284,7 +284,7 @@ var
|
||||
s1:string[4];
|
||||
values:array[0..2] of longint;
|
||||
LocalTime:tsystemtime;
|
||||
|
||||
|
||||
begin
|
||||
df := UpperCase(ShortDateFormat);
|
||||
{ Determine order of D,M,Y }
|
||||
@ -295,7 +295,7 @@ For I:=1 to Length(df) do
|
||||
'M' : mp:=which;
|
||||
'D' : dp:=which;
|
||||
else
|
||||
If df[i]=DateSeparator then
|
||||
If df[i]=DateSeparator then
|
||||
Inc(Which);
|
||||
end;
|
||||
{ Get actual values }
|
||||
@ -319,7 +319,7 @@ If N=3 then
|
||||
m:=values[mp];
|
||||
d:=values[dp];
|
||||
end
|
||||
Else
|
||||
Else
|
||||
begin
|
||||
getLocalTime(LocalTime);
|
||||
y := LocalTime.Year;
|
||||
@ -329,7 +329,7 @@ Else
|
||||
m := LocalTime.Month;
|
||||
end
|
||||
else
|
||||
If dp<mp then
|
||||
If dp<mp then
|
||||
begin
|
||||
d:=values[0];
|
||||
m:=values[1];
|
||||
@ -374,7 +374,7 @@ var
|
||||
end
|
||||
else if (S[Current] = TimeSeparator) or (S[Current] = ' ') then
|
||||
Inc(Current)
|
||||
else
|
||||
else
|
||||
raise EConvertError.Create('Invalid Time format');
|
||||
end ;
|
||||
end ;
|
||||
@ -387,7 +387,7 @@ begin
|
||||
Current := 0;
|
||||
Len := length(s);
|
||||
PM := False;
|
||||
for i:=0 to 4 do
|
||||
for i:=0 to 4 do
|
||||
timevalues[i]:=0;
|
||||
i := 0;
|
||||
TimeValues[i] := GetElement;
|
||||
@ -395,7 +395,7 @@ while (i < 5) and (TimeValues[i] <> -1) do begin
|
||||
i := i + 1;
|
||||
TimeValues[i] := GetElement;
|
||||
end ;
|
||||
If (i<5) and (TimeValues[I]=-1) then
|
||||
If (i<5) and (TimeValues[I]=-1) then
|
||||
TimeValues[I]:=0;
|
||||
if PM then Inc(TimeValues[0], 12);
|
||||
result := EncodeTime(TimeValues[0], TimeValues[1], TimeValues[2], TimeValues[3]);
|
||||
@ -515,7 +515,7 @@ var
|
||||
if Hour < 12 then StoreStr('a', 1)
|
||||
else StoreStr('p', 1);
|
||||
end
|
||||
else
|
||||
else
|
||||
Raise EConvertError.Create('Illegal character in format string');
|
||||
end ;
|
||||
'/': StoreStr(@DateSeparator, 1);
|
||||
@ -576,7 +576,7 @@ var
|
||||
'C': StoreFormat(ShortDateFormat + ' ' + ShortTimeFormat);
|
||||
end ;
|
||||
end ;
|
||||
else
|
||||
else
|
||||
Raise EConvertError.Create('Illegal character in format string');
|
||||
end ;
|
||||
FormatCurrent := FormatCurrent + Count;
|
||||
@ -632,7 +632,10 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.12 1999-05-13 21:51:41 michael
|
||||
Revision 1.13 1999-05-31 20:50:44 peter
|
||||
* removed warnings
|
||||
|
||||
Revision 1.12 1999/05/13 21:51:41 michael
|
||||
* several fixes
|
||||
|
||||
Revision 1.11 1999/05/11 09:05:13 michael
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
function NewStr(const S: string): PString;
|
||||
|
||||
Type
|
||||
Type
|
||||
PPointer = ^pointer;
|
||||
|
||||
begin
|
||||
@ -461,7 +461,7 @@ count := Length(S);
|
||||
while i < count do begin
|
||||
i := i + 1;
|
||||
{$ifndef linux}
|
||||
if (S[i] = #13) and ((i = count) or (S[i + 1] <> #10)) then
|
||||
if (S[i] = #13) and ((i = count) or (S[i + 1] <> #10)) then
|
||||
begin
|
||||
result := result + Copy(S, 1 + j, i - j) + #10;
|
||||
j := i;
|
||||
@ -470,11 +470,11 @@ while i < count do begin
|
||||
If S[i]=#13 then
|
||||
begin
|
||||
Result:= Result+Copy(S,J+1,i-j-1)+#10;
|
||||
If I<>Count Then
|
||||
If I<>Count Then
|
||||
If S[I+1]=#10 then inc(i);
|
||||
J :=I;
|
||||
end;
|
||||
{$endif}
|
||||
{$endif}
|
||||
end ;
|
||||
if j <> i then
|
||||
result := result + copy(S, 1 + j, i - j);
|
||||
@ -592,7 +592,6 @@ Var ChPos,OldPos,ArgPos,DoArg,Len : Longint;
|
||||
Hs,ToAdd : String;
|
||||
Index,Width,Prec : Longint;
|
||||
Left : Boolean;
|
||||
ExtVal: Extended;
|
||||
Fchar : char;
|
||||
|
||||
{
|
||||
@ -894,14 +893,14 @@ Begin
|
||||
Result := Length(Tmp);
|
||||
Move(Tmp[1], Buffer[0], Result);
|
||||
End;
|
||||
|
||||
|
||||
|
||||
Function FloatToStrF(Value: Extended; format: TFloatFormat; Precision, Digits: Integer): String;
|
||||
Var
|
||||
P: Integer;
|
||||
Negative, TooSmall, TooLarge: Boolean;
|
||||
|
||||
|
||||
|
||||
|
||||
Begin
|
||||
Case format Of
|
||||
|
||||
@ -948,7 +947,7 @@ Begin
|
||||
P:=4;
|
||||
While (P>0) and (Digits < P) And (Result[Precision + 5] = '0') do
|
||||
Begin
|
||||
If P<>1 then
|
||||
If P<>1 then
|
||||
system.Delete(Result, Precision + 5, 1)
|
||||
else
|
||||
system.Delete(Result, Precision + 3, 3);
|
||||
@ -1129,7 +1128,10 @@ const
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.19 1999-05-30 07:53:15 michael
|
||||
Revision 1.20 1999-05-31 20:50:45 peter
|
||||
* removed warnings
|
||||
|
||||
Revision 1.19 1999/05/30 07:53:15 michael
|
||||
+ Small fix. Delete not recognised without system in front of it ?
|
||||
|
||||
Revision 1.18 1999/05/28 20:08:20 michael
|
||||
|
Loading…
Reference in New Issue
Block a user