You are not logged in.
Pages: 1
type
MultiWideStringArray = array of array of WideString;
var
EnglishSongNameArray: MultiWideStringArray;
begin
SetLength(EnglishSongNameArray, 5, 5);
// Add your code here
// Press Ctrl+Space for code completion
// Hold Shift when loading a script to insert it inline
end.
Doesnt seem to work
Offline
I think you will need to store a multidimensional array as a single dimensional array, with a simple remapping of cell coordinates.
The script below will set your new names to "Hello World", but using a two dimensional array to store the words.
type
TTable = record
Rows: Integer;
Columns: Integer;
Data: array of WideString;
end;
function CreateTable(Rows, Columns: Integer): TTable;
begin
Result.Rows := Rows;
Result.Columns := Columns;
SetLength(Result.Data, Rows * Columns);
end;
procedure SetTable(var Table: TTable; const Row, Column: Integer; const Value: WideString);
var
Index: Integer;
begin
Index := Row * Table.Rows + Column;
Table.Data[Index] := Value;
end;
function GetTable(const Table: TTable; const Row, Column: Integer): WideString;
var
Index: Integer;
begin
Index := Row * Table.Rows + Column;
Result := Table.Data[Index];
end;
var
Table: TTable;
begin
Table := CreateTable(2,3);
SetTable(Table, 0, 0, 'Hello');
SetTable(Table, 1, 2, 'World');
FileName := GetTable(Table, 0, 0) + ' ' + GetTable(Table, 1, 2);
end.
Offline
Pages: 1