Recent

Author Topic: Array properties in TStrings class  (Read 2442 times)

simone

  • Sr. Member
  • ****
  • Posts: 352
Array properties in TStrings class
« on: August 15, 2016, 10:51:29 am »
The class TStrings has an array property Objects, defined in the pdf version of Reference guide for Free Pascal-version 3.0.0 as follows:

Code: Pascal  [Select][+][-]
  1. Property Objects[Index: Integer]: TObject

In the html version of the guide, the index is dropped:

Code: Pascal  [Select][+][-]
  1. property Objects: TObject; [rw]

(http://www.freepascal.org/docs-html/current/rtl/classes/tstrings.html)

This happens also for other array properties of the above class.

It is for sake of brevity or an error?
« Last Edit: August 15, 2016, 11:11:24 am by simone »
Microsoft Windows 10 64 bit - Lazarus 2.0.6

derek.john.evans

  • Guest
Re: Array properties in TStrings class
« Reply #1 on: August 15, 2016, 11:56:29 am »
Looks like short hand to me.

I guess there is no need to know what method/variable a property is linking to unless you are inheriting from a class. In which case, you would want to read the code.

Thaddy

  • Hero Member
  • *****
  • Posts: 10294
Re: Array properties in TStrings class
« Reply #2 on: August 15, 2016, 12:01:10 pm »
As far as I know the documentation is generated from the same source and with the same toolset.
So I guess it may just be a versioning issue. In the worst case it is a parsing issue in the toolchain, though.
Michael knows...
I am more like donkey than shrek

simone

  • Sr. Member
  • ****
  • Posts: 352
Re: Array properties in TStrings class
« Reply #3 on: August 15, 2016, 12:30:25 pm »
TStrings is an abstract class and when i working with an inherited class (e.g. TStringsList), if i don't know that 'objects' is an array property i omit the index, having a sintax error. If it's an abbreviation, it's misleading for me...

If it's a versioning problem of documentation, this means that pdf version is more  reliable than on-line html?
« Last Edit: August 15, 2016, 12:32:59 pm by simone »
Microsoft Windows 10 64 bit - Lazarus 2.0.6

Thaddy

  • Hero Member
  • *****
  • Posts: 10294
Re: Array properties in TStrings class
« Reply #4 on: August 15, 2016, 12:43:11 pm »
Michael knows...
I am more like donkey than shrek

 

TinyPortal © 2005-2018