Leif Uneus
Members-
Content Count
76 -
Joined
-
Last visited
Everything posted by Leif Uneus
-
Look at this Scimark Delphi implementation that includes a FFT library. https://github.com/philip-goh/scimark-delphi/blob/master/FFT.pas
-
Same here. I repeatedly closed the Welcome screen and opened it again with no luck. After I restarted the IDE it showed up though. A bug ???
-
For native linux ARM support, there is freepascal. See https://wiki.freepascal.org/Lazarus_on_Raspberry_Pi
-
What is the best (fast) way of checking if a string is number?
Leif Uneus replied to wuwuxin's topic in Algorithms, Data Structures and Class Design
@dummzeuch and @Rollo62 No matter if you use '123.4' or '123,4'. It gives error in position 4 with a result of 123. Oops, my bad. Indeed when a float is passed, '123.4' results in 123.4 with error = 0, while '123,4' results in 123 with error = 4. There must be an error in the docs: Though one sentence later it says: Which implies that a real type must not be a whole number. -
Look into Axolot XLSSpreadsheet. Their spreadsheet components have been around a very long time. https://www.axolot.com/xss.htm
-
Why empty dynamic arrays = NIL?
Leif Uneus replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Why would you need an excuse to do that. Go for it anyway! -
RAD Studio 11 Alexandria is now available
Leif Uneus replied to Darian Miller's topic in General Help
A faster version of Pos() is finally in place. Thanks @Stefan Glienke for making it happen. -
Fast Pos & StringReplace for 64 bit
Leif Uneus replied to Tom de Neef's topic in Algorithms, Data Structures and Class Design
I still find the fastcoders purepascal Pos() faster for 64 bit in this modification: https://stackoverflow.com/a/20947429/576719 -
Love your competitor :-) ..... ?
Leif Uneus replied to FranzB's topic in Project Planning and -Management
Borland filed a lawsuite against Microsoft at the time of Hejlsberg's departure though. See https://www.wsj.com/articles/SB863034062733665000 >Borland Charges Microsoft Stole Away Its Employees -
StackOverflow annual developer survey needs Delphi developers answering the survey
Leif Uneus replied to FPiette's topic in General Help
They profile gender, race, age, social and physical variations, education, income. Next step is political preference, sexual preference, previouse convictions, racism. -
Ok, yes a warning would be expected!
-
I don't know what you mean. For sure it gives a range check error.
-
Multiple string replace - avoid calling StringReplace multiple times
Leif Uneus replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
@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. -
Generic set comparer
Leif Uneus replied to Attila Kovacs's topic in Algorithms, Data Structures and Class Design
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. -
Generic set comparer
Leif Uneus replied to Attila Kovacs's topic in Algorithms, Data Structures and Class Design
You can find a start here: https://stackoverflow.com/a/19524788/576719 -
Delphi 64bit compiler RTL speedup
Leif Uneus replied to RDP1974's topic in RTL and Delphi Object Pascal
See the question from David at SO, years ago: https://stackoverflow.com/q/9422703/576719 -
As I understand it, the source code of Mitovs libraries can be purchased. I would never rely of a library without the source.
-
Rethinking Delphi’s management of floating point control registers
Leif Uneus replied to David Heffernan's topic in RTL and Delphi Object Pascal
Is it not enough to declare DefaultCW8087 et al. as threadvar? -
RTTI in dpr / console app dpr
Leif Uneus replied to Attila Kovacs's topic in RTL and Delphi Object Pascal
Like using the $STRONGLINKTYPES directive? http://docwiki.embarcadero.com/RADStudio/en/Strong_link_types_(Delphi) -
RTTI in dpr / console app dpr
Leif Uneus replied to Attila Kovacs's topic in RTL and Delphi Object Pascal
If a class is not used, RTTI information is stripped off by the compiler, See https://stackoverflow.com/q/10613094/576719 -
Typed constants in Delphi.
Leif Uneus replied to Mahdi Safsafi's topic in RTL and Delphi Object Pascal
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) -
Strange behavior for literals
Leif Uneus replied to Mahdi Safsafi's topic in RTL and Delphi Object Pascal
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 -
Strange behavior for literals
Leif Uneus replied to Mahdi Safsafi's topic in RTL and Delphi Object Pascal
@Vandrovnik, Still both F1 and F2 are of type extended. -
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
-
TIP: Reporting bugs for RAD Studio / Delphi
Leif Uneus replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
You might be better off with this link to QP: https://quality.embarcadero.com