Jump to content

A.M. Hoornweg

Members
  • Content Count

    95
  • Joined

  • Last visited

  • Days Won

    2

A.M. Hoornweg last won the day on January 12

A.M. Hoornweg had the most liked content!

Community Reputation

42 Excellent

Recent Profile Visitors

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

  1. A.M. Hoornweg

    Thinfinity VirtualUI - cloud-based conversion

    I have just tried some of their live demos. They do not work in my Opera browser but they do work with Edge. So depending on your browser, your mileage may vary.
  2. A.M. Hoornweg

    Thinfinity VirtualUI - cloud-based conversion

    An OCX *is* a DLL.
  3. A.M. Hoornweg

    Why can't I install this monospaced font in Delphi ?

    Currently "Consolas" and "Source Code Pro" are my favorites.
  4. Hello all, I would like to test a certain new monospaced font in Delphi but none of my Delphi versions displays it in the font drop-down list. Is there anything I can do to use it anyway?
  5. A.M. Hoornweg

    What's the best common folder for...

    Hi Stefan, do you know if that folder is only for domain users? Or are there other scenarios in which that folder is synced between machines?
  6. A.M. Hoornweg

    Bug in Delphi string behavior?

    Strange, when I first noticed the problem it went away 100% after I replaced string with widestring. But somehow I can't reproduce that anymore. Weird!
  7. A.M. Hoornweg

    Memory leak in UnicodeString to string conversion

    Library, as in DLL? You really can't pass a "string" from a DLL to an application, except when both projects are configured to use a shared memory manager ("uses sharemem").
  8. A.M. Hoornweg

    Bug in Delphi string behavior?

    I meant, the allocated memory in a widestring isn't managed by the Delphi heap but by Windows.
  9. A.M. Hoornweg

    Bug in Delphi string behavior?

    There is one thing I don't understand though. In the example below, shouldn't the string which is held by variable S have a reference count of at least 2 when procedure Test is called? One held by S itself, one by Defaultvalue? Normally the compiler should perform a Uniquestring whenever something is written to a string with refcount >1, or? procedure TForm1.Test(Defaultvalue: string; out Resultvalue: string); begin Resultvalue:=AnsiUpperCase(Defaultvalue); ShowMessage(Defaultvalue+'.'+Resultvalue); end; procedure TForm1.Button1Click(Sender: TObject); var s:string; begin s:='default'; Test(s,s); end;
  10. A.M. Hoornweg

    Bug in Delphi string behavior?

    Besides, the problem is not consistent, it only occurs with managed types. For example, it does not occur with WideString.
  11. A.M. Hoornweg

    Bug in Delphi string behavior?

    IMHO the compiler should throw an error if the same parameter is passed multiple times to the method and one of them is an OUT parameter.
  12. A.M. Hoornweg

    Bug in Delphi string behavior?

    Omitting the "const" changes nothing though. Delphi still passes it by reference even though it looks like a value parameter.
  13. A.M. Hoornweg

    Bug in Delphi string behavior?

    I suspect that it may do so. The "const" makes no difference. Using "VAR" instead of "OUT" also fixes the issue. I am quite alarmed by this issue because recently, whilst refactoring, I started replacing a lot of "VAR" parameters by "OUT" in order to make it more concise to a reader how the parameters are affected. But now it appears that "OUT" is dangerous if you pass the same parameter multiple times.
  14. Hello all, I think I've discovered an anomaly in Delphi string behavior. Consider the following code: procedure TForm1.Test(const Defaultvalue: string; out Resultvalue: string); begin Resultvalue:=AnsiUpperCase(Defaultvalue); ShowMessage(Defaultvalue+'.'+Resultvalue); end; procedure TForm1.Button1Click(Sender: TObject); var s:string; begin s:='default'; Test(s,s); end; The output produces just a dot, which makes no sense to me.
  15. A.M. Hoornweg

    can you reference unit name in code?

    Is the sequence of the units in the map file identical to the sequence in which the initialization sections are processed?
×