Jump to content
Updated RadStudio RoadMap Read more... ×
Vince Bartlett

TBytes & TByteDynArray Change in 10.3

Recommended Posts

Hi

 

Just installed 10.3 and tried to compile my main project.

I have a class that messes about with byte arrays using overloaded functions (as shown below)

   TMyClass = class
      public
         class function Fn1(const sText: string; bRLB: boolean = true): string; overload;
         class function Fn1(arData: TBytes; bRLB: boolean = true): string; overload;
         class function Fn1(arData: TByteDynArray; bRLB: boolean = true): string; overload;

         ...

This has been fine in all previous versions but now get a compilation error on the third version of the function. I assume it's saying that in 10.3 TBytes = TByteDynArray?

 

Cheers for any opinions.

Share this post


Link to post

That is correct! With 10.3 there is no difference in TBytes and TByteDynArray. Both are TArray<Byte>. You can simply remove the TByteDynArray overload when compiling for 10.3.

  • Like 1

Share this post


Link to post

In 10.2.3 there are:

  • TBytes = TArray<Byte> = array of Byte;
  • TByteDynArray = array of Byte;

Although they are declared as different types, internally they are the same.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×