Recent

Author Topic: Generics.collections documentation  (Read 731 times)

julkas

  • Sr. Member
  • ****
  • Posts: 430
  • KISS principle / Lazarus 2.0.0 / FPC 3.0.4
Generics.collections documentation
« on: July 22, 2019, 06:06:41 pm »
Where I can find generics.collections documentation?
« Last Edit: July 22, 2019, 06:20:18 pm by julkas »
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;

Thaddy

  • Hero Member
  • *****
  • Posts: 9278
Re: Generics.collections documentation
« Reply #1 on: July 22, 2019, 06:35:59 pm »
embarcadero.com ? The interface is 99% compatible with Delphi, so you can use that as a guideline.
This helps: http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate1/EN/pdf/genericcollections.pdf
Most if not all of the example code in that pdf works in Freepascal too....

The Freepascal version of generics.collections has more options than Delphi, but I guess you have to familiarize yourself with the sourcecode on how to use those extra's.
Beginners and intermediates won't use most of those extra's anyway.(way too low-level) But there are some gems for everybody too.
« Last Edit: July 22, 2019, 06:48:48 pm by Thaddy »
also related to equus asinus.

julkas

  • Sr. Member
  • ****
  • Posts: 430
  • KISS principle / Lazarus 2.0.0 / FPC 3.0.4
Re: Generics.collections documentation
« Reply #2 on: July 23, 2019, 02:58:30 pm »
@Thaddy Thanks.
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;

JD

  • Hero Member
  • *****
  • Posts: 1758
Re: Generics.collections documentation
« Reply #3 on: July 24, 2019, 08:25:24 am »
embarcadero.com ? The interface is 99% compatible with Delphi, so you can use that as a guideline.
This helps: http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate1/EN/pdf/genericcollections.pdf
Most if not all of the example code in that pdf works in Freepascal too....

The Freepascal version of generics.collections has more options than Delphi, but I guess you have to familiarize yourself with the sourcecode on how to use those extra's.
Beginners and intermediates won't use most of those extra's anyway.(way too low-level) But there are some gems for everybody too.

Thanks a million for the tip and the link Thaddy.

JD
Windows (10, 7) - Lazarus 2.0RC3/FPC 3.2, NewPascal, Delphi

Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

julkas

  • Sr. Member
  • ****
  • Posts: 430
  • KISS principle / Lazarus 2.0.0 / FPC 3.0.4
Re: Generics.collections documentation
« Reply #4 on: July 24, 2019, 04:26:16 pm »
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;

Thaddy

  • Hero Member
  • *****
  • Posts: 9278
Re: Generics.collections documentation
« Reply #5 on: July 24, 2019, 05:25:00 pm »
PasDoc generated - https://julstrat.github.io/generics.collections
Yes, but that is missing examples and has hardly any explanation in most cases.
The PDF has examples as well as about the same info as your link provides.

Still there's no harm in using them both: yours for reference, the pdf as user manual.
also related to equus asinus.

VTwin

  • Hero Member
  • *****
  • Posts: 793
  • Former Turbo Pascal 3 user
Re: Generics.collections documentation
« Reply #6 on: July 24, 2019, 05:58:59 pm »
Thanks all for the links. I may not dive in for a while, but will have a look at some point.
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0.7 fixes svn 62300 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.6 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.6 (64 bit on VBox)
fpc 3.0.4

julkas

  • Sr. Member
  • ****
  • Posts: 430
  • KISS principle / Lazarus 2.0.0 / FPC 3.0.4
Re: Generics.collections documentation
« Reply #7 on: July 24, 2019, 06:14:48 pm »
PasDoc generated - https://julstrat.github.io/generics.collections
Yes, but that is missing examples and has hardly any explanation in most cases.
The PDF has examples as well as about the same info as your link provides.

Still there's no harm in using them both: yours for reference, the pdf as user manual.
Yes, my just for class ref. I made it today, and found bug in PasDoc.
procedure mulu64(a, b: QWORD; out clo, chi: QWORD); assembler;
asm
  mov rax, a
  mov rdx, b
  mul rdx
  mov [clo], rax
  mov [chi], rdx
end;

hnb

  • Sr. Member
  • ****
  • Posts: 268
Re: Generics.collections documentation
« Reply #8 on: July 25, 2019, 09:20:54 am »
for main differences between Delphi and FPC implementation you can also see this document :

https://github.com/maciej-izak/generics.collections/blob/master/GenericsCompatibilityMatrix.pdf
Checkout NewPascal initiative and donate beer - ready to use tuned FPC compiler + Lazarus for mORMot project

best regards,
Maciej Izak