Results 1 to 3 of 3

Thread: Write an index of an array

  1. #1
    Join Date
    Feb 2013
    Posts
    89
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default Write an index of an array

    how can i write an index of an array?

    Simba Code:
    WriteLn(Array[RandomRange(0,ArrayLength)]);

  2. #2
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Simba Code:
    var
      index: Integer;
      TSA: TStringArray;
      TIA: TIntegerArray;
    begin
      index := 2;
      TSA := ['hello', 'world', 'foo'];
      Writeln('Index of TSA[' + IntToStr(index) + '], string value: ' + TSA[index]);
      // or
      TIA := [0, 1, 2];
      Writeln('Index of TIA[' + IntToStr(index) + '], Integer value: ' + IntToStr(TIA[index]));
    end.

  3. #3
    Join Date
    Feb 2013
    Posts
    89
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    i love you lotssss

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •