[Delphi] Текстовый индекс в массиве - возможно ли?

Discussion in 'С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby' started by Diamantx, 29 Apr 2013.

  1. Diamantx

    Diamantx New Member

    Joined:
    17 Feb 2012
    Messages:
    64
    Likes Received:
    1
    Reputations:
    0
    Например, one['two']:='three';
     
  2. GRRRL Power

    GRRRL Power Elder - Старейшина

    Joined:
    13 Jul 2010
    Messages:
    823
    Likes Received:
    185
    Reputations:
    84
    http://tinyurl.com/ckv997n
     
  3. xophet

    xophet Member

    Joined:
    16 Apr 2011
    Messages:
    617
    Likes Received:
    49
    Reputations:
    5
    Если текст-текст, то TStringList
    Code:
    a:=TStringList.Create;
    try
      a.values['one']:='two';
      ShowMessage(a.Values['one']);
      a.Clear;
      a.NameValueSeparator:='=';
      a.Add('1=2');
      ShowMessage(a.Values['1']);
    finally
      a.Free;
    end;
    
     
  4. Diamantx

    Diamantx New Member

    Joined:
    17 Feb 2012
    Messages:
    64
    Likes Received:
    1
    Reputations:
    0
    Всем громадное спасибо