AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Array of String wird nicht als solches erkannt

Ein Thema von St0rmhunter · begonnen am 20. Aug 2011 · letzter Beitrag vom 21. Aug 2011
 
USchuster

Registriert seit: 12. Sep 2010
Ort: L.E.
120 Beiträge
 
Delphi XE3 Professional
 
#3

AW: Array of String wird nicht als solches erkannt

  Alt 20. Aug 2011, 15:05
Folgendes Beispiel compiliert wenigsten mit Delphi 5 bis XE und die Prozedur tut es auch mit Lazarus.

Delphi-Quellcode:
program Project110;

{$APPTYPE CONSOLE}

uses
  SysUtils, Classes;

procedure StringArrayTest;
var
  I: Integer;
  SL: TStringList;
  Text: array of string;
begin
  SL := TStringList.Create;
  try
    for I := 1 to 10 do
      SL.Add(Format('Zeile %d', [I]));
    SetLength(Text, SL.Count);
    for I := 0 to SL.Count - 1 do
    begin
      Text[I] := SL[I];
      SL[I] := Text[I];
    end;
  finally
    SL.Free;
  end;
end;

begin
  StringArrayTest;
end.
Ich tippe auf Scope Probleme.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:12 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz