Ver Mensaje Individual
  #6  
Antiguo 13-03-2014
Avatar de gatosoft
[gatosoft] gatosoft is offline
Miembro Premium
 
Registrado: may 2003
Ubicación: Bogotá, Colombia
Posts: 833
Reputación: 21
gatosoft Va camino a la fama
Pues si no es tarde aún para reportar incidencias, partiendo de la versión XE2 genera los siguientes errores:

en GHFVCL:

Código Delphi [-]
  Function ghMasterLink (Const ADataSet :TDataSet) :TMasterDataLink;
  Var
    I :Integer;
  Begin
    { In some data set classes, the master data link is a private field
      without access property.  This function returns that data link. }

    If ADataSet.DataSource <> Nil Then
      With TDataSourceAccess (ADataSet.DataSource) Do
        For I := 0 To DataLinks.Count - 1 Do
          If (TDataLink (DataLinks [i]) Is TMasterDataLink) And
          (TMasterDataLinkAccess (DataLinks [i]).GetDetailDataSet =
          ADataSet) Then
          Begin
            // DataSet's master data link found
            Result := DataLinks [i]; //[dcc32 Error] GHFVCL.pas(1005): E2010 Incompatible types: 'TMasterDataLink' and 'TDataLink'
            Exit;
          End;

    Result := Nil;
  End;


En GHFRTL:

Código Delphi [-]
  Function ghDecimals (Const Value :Extended) :Integer;
  Begin
    If Frac (Value) <> 0 Then
      With ghDecimal (Value) Do
        { When Frac (Value) <> 0 and Exponent < 18, StrLen (Digits) is
          greater than Exponent.  StrLen (Digits) - Exponent =
          "represented" decimals in Value. }
        If Exponent < 18 Then
          Result := Integer (StrLen (Digits)) - Exponent //[dcc32 Error] GHFRTL.pas(3601): E2250 There is no overloaded version of 'StrLen' that can be called with these arguments
                                                                        //[dcc32 Warning] GHFRTL.pas(3601): W1000 Symbol 'StrLen' is deprecated: 'Moved to the AnsiStrings unit'
        Else
          Result := 0  // Value has no "represented" decimals
    Else
      Result := 0;
  End;


Código Delphi [-]
  Function ghFracDecimal (Const Value :Extended;
    Decimals :Integer = MaxInt) :Extended;
  Var
    Buffer :PANSIChar Absolute Result;
    Desc :TFloatRec;  // Decimal descriptor
  Begin
    { Frac (-123.0045) -> -0.0044999...
      ghFracDecimal (-123.0045) -> -0.0045 }

    Result := Frac (Value);

    If Result = 0 Then
      Exit;

    { If Value is not a fraction but has fractional part, then we try to
      get it based on its decimal representation }
    If Abs (Value) > 1 Then
    Begin
      Desc := ghDecimal (Value);

      { When Frac (Value) <> 0 and Exponent < 18, StrLen (Digits) is
        greater than Exponent.  StrLen (Digits) - Exponent = "represented"
        decimals in Value.  If Exponent >= 18 then Value has no
        "represented" decimals. }
      If Desc.Exponent < 18 Then
      Begin

        If (Decimals < MaxInt) And (Integer (StrLen (Desc.Digits)) - //[dcc32 Error] GHFRTL.pas(4256): E2250 There is no overloaded version of 'StrLen' that can be called with these arguments
        Desc.Exponent <= Decimals) Then
          Decimals := MaxInt;

        { -123.0045, Digits = ['1', '2', '3', '0', '0', '4', '5', #0...] ->
          ['1', '-', '.', '0', '0', '4', '5', #0...], Buffer = '-.0045'.
          NOTE: This operation can overwrite the Desc's Exponent and
          Negative fields. ---------------------------------------------- }

        Buffer := PANSIChar (@Desc.Digits) + (Desc.Exponent - 2);

        If Desc.Negative Then
          Buffer [0] := '-'
        Else
          Inc (Buffer);

        Buffer [Byte (Buffer [0] = '-')] :=
          ghANSIChr (FormatSettings.DecimalSeparator);

        //-----------------------------------------------------------------

        TextToFloat (Buffer, Result, fvExtended);  // '-.0045' -> -0.0045
      End;
    End;

    If Decimals < MaxInt Then
      Result := ghRound (Result, Decimals);
  End;

Saludos,
Responder Con Cita