Jump to content

Leif Uneus

Members
  • Content Count

    41
  • Joined

  • Last visited

Community Reputation

27 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Leif Uneus

    Delphi WAT of the day

    Ok, yes a warning would be expected!
  2. Leif Uneus

    Delphi WAT of the day

    I don't know what you mean. For sure it gives a range check error.
  3. @Mike Torrettinni If you are looking for a faster Pos() function in 64-bit mode, see https://stackoverflow.com/a/20947429/576719 It is based on Fastcoders purepascal version. Just added some details to make it compile in 64-bit.
  4. Leif Uneus

    Generic set comparer

    Well. there is no secret that LU RD is short for Leif Uneus R&D Manager of Opsis AB, a company that provides analysers and software for industrial and environmental analysis of gases and particulates. A company started 36 years ago by me and my business partner. Core software in the analysers is built with Turbo Pascal 7. Delphi is a tool for our software for data management, analysis and reporting.
  5. Leif Uneus

    Generic set comparer

    You can find a start here: https://stackoverflow.com/a/19524788/576719
  6. Leif Uneus

    Delphi 64bit compiler RTL speedup

    See the question from David at SO, years ago: https://stackoverflow.com/q/9422703/576719
  7. Leif Uneus

    Unfixed bug in Sydney

    As I understand it, the source code of Mitovs libraries can be purchased. I would never rely of a library without the source.
  8. Is it not enough to declare DefaultCW8087 et al. as threadvar?
  9. Leif Uneus

    RTTI in dpr / console app dpr

    Like using the $STRONGLINKTYPES directive? http://docwiki.embarcadero.com/RADStudio/en/Strong_link_types_(Delphi)
  10. Leif Uneus

    RTTI in dpr / console app dpr

    If a class is not used, RTTI information is stripped off by the compiler, See https://stackoverflow.com/q/10613094/576719
  11. Leif Uneus

    Typed constants in Delphi.

    Whether a typed constant is immutable or not is controlled by a compiler switch. See http://docwiki.embarcadero.com/RADStudio/en/Writeable_typed_constants_(Delphi)
  12. Leif Uneus

    Strange behavior for literals

    The type is still extended, but the value will be as a single(0.1) program Project169; {$APPTYPE CONSOLE} uses System.SysUtils, System.TypInfo; type TTypeInfo = class class function ShowTypeInfo<T>(const X: T) : String; end; class function TTypeInfo.ShowTypeInfo<T>(const X: T) : String; var LTypeInfo: PTypeInfo; begin LTypeInfo := TypeInfo(T); Result := LTypeInfo.Name; end; const F1 : Single = 0.1; F2 = Single(0.1); // <- Extended type, with the value of a single 0.1 F3 = Extended(0.1); begin WriteLn(TTypeInfo.ShowTypeInfo(F1):10,':',F1); WriteLn(TTypeInfo.ShowTypeInfo(F2):10,':',F2); WriteLn(TTypeInfo.ShowTypeInfo(F3):10,':',F3); ReadLn; end. Outputs: Single: 1.00000001490116E-0001 Extended: 1.00000001490116E-0001 Extended: 1.00000000000000E-0001
  13. Leif Uneus

    Strange behavior for literals

    @Vandrovnik, Still both F1 and F2 are of type extended.
  14. Leif Uneus

    TStopwatch.Elapsed

    Use StopWatch := TStopWatch.Create to initialize a new TStopWatch value in a stopped condition or StopWatch := TStopWatch.StartNew to return a started stopwatch. See http://docwiki.embarcadero.com/Libraries/Rio/en/System.Diagnostics.TStopwatch.Create
  15. You might be better off with this link to QP: https://quality.embarcadero.com
×