Skip to content

Omit untested compilers from snippet documentation #143

Closed
@delphidabbler

Description

@delphidabbler

At present all compilers are listed in snippet documentation. That's a long list and often snippets have only been tested against a few.

Would it be better to omit the compilers for which the snippet has not been tested from the list?

Here's an example of Snippet documentation / information generated by the Edit | Copy Information menu option:

CloneByteArray

Makes a copy of an array of bytes.

function CloneByteArray(const B: array of Byte): TBytes;
begin
  SetLength(Result, Length(B));
  if Length(B) > 0 then
    Move(B[0], Result[0], Length(B));
end;

Snippet Type:
    Routine
Category:
    Arrays
Required units:
    None.
Required snippets:
    TBytes.
See also:
    AppendByteArray.

Supported compilers:
Delphi 2       Does not compile
Delphi 3       Does not compile
Delphi 4       Compiles OK
Delphi 5       Compiles OK
Delphi 6       Compiles OK
Delphi 7       Compiles OK
Delphi 2005    Compiles OK
Delphi 2006    Compiles OK
Delphi 2007    Compiles OK
Delphi 2009    Compiles OK
Delphi 2010    Compiles OK
Delphi XE      Compiles OK
Delphi XE2     Compiles OK
Delphi XE3     Compiles OK
Delphi XE4     Compiles OK
Delphi XE5     Not tested
Delphi XE6     Not tested
Delphi XE7     Not tested
Delphi XE8     Not tested
Delphi 10      Compiles OK
Delphi 10.1    Not tested
Delphi 10.2    Not tested
Delphi 10.3    Not tested
Delphi 10.4    Not tested
Delphi 11.x    Not tested
Delphi 12.x    Not tested
Free Pascal    Compiles OK

Useful for creating a TBytes array from a constant array or for cloning an
existing byte array.

A snippet from the DelphiDabbler Code Snippets Database
(https://github.com/delphidabbler/codesnip), licensed under the MIT License
(https://opensource.org/licenses/MIT).

The suggestion is to change this to:

CloneByteArray

Makes a copy of an array of bytes.

function CloneByteArray(const B: array of Byte): TBytes;
begin
  SetLength(Result, Length(B));
  if Length(B) > 0 then
    Move(B[0], Result[0], Length(B));
end;

Snippet Type:
    Routine
Category:
    Arrays
Required units:
    None.
Required snippets:
    TBytes.
See also:
    AppendByteArray.

Tested with the following compilers:

Delphi 2       Does not compile
Delphi 3       Does not compile
Delphi 4       Compiles OK
Delphi 5       Compiles OK
Delphi 6       Compiles OK
Delphi 7       Compiles OK
Delphi 2005    Compiles OK
Delphi 2006    Compiles OK
Delphi 2007    Compiles OK
Delphi 2009    Compiles OK
Delphi 2010    Compiles OK
Delphi XE      Compiles OK
Delphi XE2     Compiles OK
Delphi XE3     Compiles OK
Delphi XE4     Compiles OK
Delphi 10      Compiles OK
Free Pascal    Compiles OK

Useful for creating a TBytes array from a constant array or for cloning an
existing byte array.

A snippet from the DelphiDabbler Code Snippets Database
(https://github.com/delphidabbler/codesnip), licensed under the MIT License
(https://opensource.org/licenses/MIT).

Metadata

Metadata

Assignees

Labels

completedWork has been completed on this issue and changes have been committed to `develop` branch..feature requestRequest for a new feature

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy