Recent

Author Topic: Helper for TArray  (Read 3767 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 18324
  • Here stood a man who saw the Elbe and jumped it.
Re: Helper for TArray
« Reply #15 on: March 08, 2024, 09:59:19 pm »
Delphi does support implicit specializations, that's one of the reasons why we added it. What Delphi does not support is global generic functions, only generic methods.
Thank you for the correction.
It is your fault.  >:(
Thanks to you and the likes of Ryan I only use Delphi for testing.
 :D

Anyway, my answer is a good solution to the original problem.
I never figured it was THAT easy.
« Last Edit: March 08, 2024, 10:04:28 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Ryan J

  • Full Member
  • ***
  • Posts: 138
Re: Helper for TArray
« Reply #16 on: March 09, 2024, 03:29:35 pm »
Unfortunately Free Pascal does not support generic helpers (yet)

I spent hours developing this feature but I got no response on my patch. I probably did a number of things wrong but we didn't even make it that far. I assume they won't care about it until Delphi implements this feature.

Thaddy

  • Hero Member
  • *****
  • Posts: 18324
  • Here stood a man who saw the Elbe and jumped it.
Re: Helper for TArray
« Reply #17 on: March 09, 2024, 04:14:01 pm »
Well at least thanks to your previous work I could implement my last examples.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Helper for TArray
« Reply #18 on: March 10, 2024, 03:26:48 am »
I spent hours developing this feature but I got no response on my patch. I probably did a number of things wrong but we didn't even make it that far. I assume they won't care about it until Delphi implements this feature.
Thank you for mentioning RJ. It is very unfortunate that your MR for generic helpers is around for over a year now...
« Last Edit: March 10, 2024, 03:29:23 am by TRon »
Today is tomorrow's yesterday.

Molochnik

  • Jr. Member
  • **
  • Posts: 80
Re: Helper for TArray
« Reply #19 on: March 11, 2024, 11:43:51 am »
Thaddy
Than you very much! Your snippet allowed me to advance in moving the large project to Lazarus. It went almost smoothly right up until I encountered the error:
Code: Pascal  [Select][+][-]
  1. TdsCryptoAPIStorageUni.pas(188,57) Error: Internal error 200307043
Then I stopped (it was the trunk version).

Thaddy

  • Hero Member
  • *****
  • Posts: 18324
  • Here stood a man who saw the Elbe and jumped it.
Re: Helper for TArray
« Reply #20 on: March 11, 2024, 12:07:42 pm »
In the file TdsCryptoAPIStorageUni.pas Mask out floating point exceptions with SetExceptionMask.
Although the compiler should not throw an internal error, this is likely the cause.
« Last Edit: March 11, 2024, 12:10:08 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Molochnik

  • Jr. Member
  • **
  • Posts: 80
Re: Helper for TArray
« Reply #21 on: March 11, 2024, 12:49:49 pm »
Thaddy yes, thanks! The job continues.
Another small issue, SetLastWriteTime and some others next to it from IOUtils are commented. I can write them myself in Win and Linux (its not that difficult) but interesting why is that.
« Last Edit: March 11, 2024, 12:54:13 pm by Molochnik »

Thaddy

  • Hero Member
  • *****
  • Posts: 18324
  • Here stood a man who saw the Elbe and jumped it.
Re: Helper for TArray
« Reply #22 on: March 11, 2024, 04:55:36 pm »
Looks like those are not fully implemented for cross platform use.
Some of those are implemented for Unix, though.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

 

TinyPortal © 2005-2018