Jump to content

Alexander Elagin

Members
  • Content Count

    198
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Alexander Elagin

  1. History teaches us that nothing is new under the moon. Limiting the scope of a varable to the begin/end block was invented long ago, just have a look at the PL/I specification from 1964:
  2. Alexander Elagin

    Opinions about Pascal vs C/C++ IDE

    I also wrote a lot of assembly code a while ago, mostly for the 8051 family. Nothing beats a good assembler code when you need to get the most from the hardware. All those fancy higher level languages make it easier to write programs, but when all you have is 8K of program memory and 256 bytes of RAM shared with bits and register banks, then the real work begins
  3. Alexander Elagin

    Opinions about Pascal vs C/C++ IDE

    As for embedded controllers - yes, plain C is the best choice. The new generations of coders may prefer Rust or C++ for this, current microcontrollers are way more powerful than a two decades old desktop PCs. But one can use a custom edition of Lazarus for bare metal programming of Raspberry Pi: https://ultibo.org/
  4. Alexander Elagin

    SplitString

    I do not get any error here in 10.3: uses Types, StrUtils; var S, FS, SS: String; A: TStringDynArray; begin S := '5/10'; A := SplitString(S, '/'); if Length(A) >= 2 then begin FS := A[0]; SS := A[1]; end; end;
  5. Alexander Elagin

    Pos

    There is also a function SplitString() in StrUtils.pas.
  6. Also look here: https://web.archive.org/web/20050307135804/https://www.simdesign.nl/fft.html The archived version has all the necessary files while the actual site currently produces error 404
  7. Alexander Elagin

    SudokuHelper - Example for uncoupled design via interfaces

    A small correction: 8080 has a 16-bit address bus and a 8-bit data bus (I am currently building a retro computer based on 8080A + 8224 + 8257 + 8275 + 8255A). 8085 also had a 16-bit address bus but it was multiplexed with the 8-bit data bus and required an additional latch for full address decode. Otherwise, your post was outstanding and very informative, thank you!
  8. Alexander Elagin

    SudokuHelper - Example for uncoupled design via interfaces

    Does not compile in 10.1 because of inline variables. What was the reason to use the cosmetic feature only available in the latest versions?
  9. Alexander Elagin

    Firebird Admin Tool

    IBExpert can do it as well:
  10. Alexander Elagin

    Firebird Admin Tool

    IBExpert, of course (https://www.ibexpert.net). DBeaver is a good tool, but not so fine tuned for the Firebird specifics.
  11. Alexander Elagin

    New to JSON

    Have a look at Andreas Hausladen's JsonDataObjects (https://github.com/ahausladen/JsonDataObjects), I think it is easier to use than the stock TJSONObject.
  12. Alexander Elagin

    RAD Studio 11 Alexandria Patch 1 Available

    All this once again raises a question about a LTS verison of Delphi. Let those who need yearly new bells and whistles have their yearly releases, and the others who need to have a solid stable version have it with all the necessary patches.
  13. A redundant begin/end block around a single Continue, maybe? It just increases the number of lines and clutters the view, IMHO. if Utc.IsZero then Continue else begin _UtcValid := Utc; ...
  14. Alexander Elagin

    DevExpress PDF Viewer

    Delphi 10.1 DevExpress VCL 20.1.5 win32 / Debug configuration Blank application: 2 200 576 bytes Blank application with a single TdxPDFViewer: 15 368 704 bytes With an autogenerated toolbar: 21 126 656 bytes.
  15. Alexander Elagin

    OLE structured storage library replacement for Plasmatech

    I think that not much has changed in the structured storage implementation in the last two decades. If the library you are using works (and you have the sources) it will work until MS drops the OLE storage (or CFB, as they call it now) support. Anyway, it is all based on a simple set of COM interfaces (IStorage) and it would be easy to use them directly or write a simple wrapper if needed. Documentation for IStorage compound file implementation
  16. Alexander Elagin

    Delphi 11 Windows XP compatibility tweak

    It is more stable in the configurations it is being used now. If nothing in the OS has broken thus far and no updates expected which can break something (as it regularily happens with "supported" OSes) I'd say XP machines will run until they break physically. Again, those computers are mostly not exposed to internet and are therefore not vulnerable to net exploits.
  17. Alexander Elagin

    Delphi 11 Windows XP compatibility tweak

    I was going to suggest this solution myself but then I thought it was too obvious 😉 and the code in System.Threading (which I quoted) was written by somebody more clever than me...
  18. Alexander Elagin

    Delphi 11 Windows XP compatibility tweak

    But using GetTickCount64 in fact is a must for their code in the Threading unit which internally uses the milliseconds counter. As you know, the counter overflows every 49 or so days and some threads in your server application just hang waiting until the condition TThread.GetTickCount > FLastSuspendTick.Value + TThreadPool.SuspendInterval is fulfilled... I got hit by this myself. Of course, it mostly matters for the applications that run 24/7, but anyway using the 64 bit counter is a wise decision.
  19. Alexander Elagin

    10.4.1+ Custom Managed Records usable?

    It is probably a semantic question. A ternary operator, by definition, is any operator that takes three arguments. The conditional operator ?: is just one of the set of such possible operators. It is easy to imagine, say, operator AAAND which takes three logical arguments and produces TRUE only if all of them are true, but the usefullness of such operator is not high. As for the textual representation of a ternary operator, it is a problem. While a binary operator naturally is placed between its arguments, it is worse in case of the ?: operator which in fact is written as two lexems divided by one of arguments. Were it written as a = ?: b, c, d it would be more strict. Maybe. Or maybe not.
  20. Alexander Elagin

    Why compiler allows this difference in declaration?

    In fact, Delphi supports named parameters, but only for automation (OLE/COM) objects. Like this (from http://www.blong.com/articles/automation in delphi/automation.htm): //An Automation method call, using two named parameters MSWord.Selection.InsertDateTime( DateTimeFormat := 'dddd, dd MMMM yyyy', InsertAsField := False); MSWord.Selection.TypeParagraph;
  21. Alexander Elagin

    VMWare Workstation PRO vs MS Hyper-V

    Have been using paid VMware Workstation since its version 5, no problems thus far. Easy to carry VM (on a eSATA or USB3.1 external SSD drive) between different computers, no problems with USB devices in the guest OS (I stick with W7 Pro as the guest OS). Graphics is a bit slower in the guest compared to the host, otherwise no speed differences.
  22. Alexander Elagin

    Developer Express gave up on FMX

    FMX might be good for mobile OSes, but not for heavy desktop applications. If one needs a Linux version of an existing VCL application with years of manpower already invested in its development, then going the FMX way means the total rewrite of the UI in the best case, or even some internal logic if the application does not have some ideal architecture (trust me, this is the most common case). Meanwhile, Lazarus clearly demonstrates that it is easy to make a crossplatform (Windows/Linux) desktop application with a single VCL-like codebase, and even convert an existing Delphi VCL project if it does not use complex third-party components. Alas, DevExpress suite is too complex and too Windows-rooted... I understand that Embarcadero decided to make its cross-platform framework from scratch thinking primarily about the mobile OSes. The Linux support arrived many version later, without any desktop support and only in the very expensive edition - as if they decided that Linux is something used on servers only. This is obviously not the case, but I think they have already lost the race to Lazarus. If only Embarcadero had decided to sublicense CrossVCL instead of FMXLinux... but they chose the wrong path.
  23. Alexander Elagin

    50 Years of Pascal

    I remember compiling a (then) large FoxPro program with a text windows interface on PC XT. It even would not link at all - the linker crashed after a half of an hour - unless I replaced the linker with another (probably Watcom but I do not remember the detail) which could finally produce a working executable in just 40 minutes of heavy work. Those were the days...
  24. Alexander Elagin

    Problems making a calculator with DELPHI in RAD STUDIO. (Tan, Cos, Sin)

    Mainly for the historical reasons. Turbo Pascal back in 1980's implemented a set of mathematical functions as a part of its standard (default) library which was implicitly used by any project (and still is in Delphi). This set included among others sin, cos, arctan but not tan, because it is simply sinus divided by cosinus. Now, decades later, Delphi significally extended the function list, which are now implemented in a separate unit System.Math. But the original functions are still available by default without using this module.
×