散分帖!基础语法有关问题~

散分帖!基础语法问题~~~
经常看到一些书里没讲过的格式,比如下面两个:

1:property Tabs[AIndex: Integer]: TTabItem read GetTabItem;

Tabs后面的[AIndex: Integer]是什么意思?起什么作用?书里没讲过这种属性名后面还能带中括号的。。。。


2: 有时候看到有的类的实例,比如某类实例Abc,  abc[xxxxx]. 这个中括号又是什么意思?类里那个方法能让他的实例实现这样的名字后面带中括号?
------解决思路----------------------
1、property 声明属性
2、property 声明属性时,可以带参数,只能使用[]不能用()。而且不能放在published字段内。
实例:

  TForm1 = class(TForm)
  private
   function GetNumberName(index1 :Integer):String;
    { Private declarations }
  public
   property NumberName[index1 :Integer]:String read GetNumberName;
   { Public declarations }
  end;

function TForm1.GetNumberName(index1: Integer): String;
begin
  result:=IntToStr(index1);
end; 

------解决思路----------------------
引用:
1、property 声明属性
2、property 声明属性时,可以带参数,只能使用[]不能用()。而且不能放在published字段内。
实例:

  TForm1 = class(TForm)
  private
   function GetNumberName(index1 :Integer):String;
    { Private declarations }
  public
   property NumberName[index1 :Integer]:String read GetNumberName;
   { Public declarations }
  end;

function TForm1.GetNumberName(index1: Integer): String;
begin
  result:=IntToStr(index1);
end; 


散分帖!基础语法有关问题~
------解决思路----------------------
索引功能吧,c#和扎瓦中的索引器???
------解决思路----------------------
1,数组属性,一般书中也有讲到
2,一般是列表或集合对象引用默认属性,比如:

sl:TStrings
......
访问某一项,sl.items[0],简化成sl[0],Items是其默认属性