How to concatenate 2 arrays? [duplicate]
up vote
0
down vote
favorite
This question already has an answer here:
How to append one array to another array of same type in Delphi?
3 answers
Is their any helper to concatenate 2 arrays? I mean an helper to add all the elements of array1 to the end of array2 ?
array1: array of integer;
array2: array of integer;
delphi pascal
marked as duplicate by whosrdaddy, LU RD
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 9 at 12:50
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
up vote
0
down vote
favorite
This question already has an answer here:
How to append one array to another array of same type in Delphi?
3 answers
Is their any helper to concatenate 2 arrays? I mean an helper to add all the elements of array1 to the end of array2 ?
array1: array of integer;
array2: array of integer;
delphi pascal
marked as duplicate by whosrdaddy, LU RD
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 9 at 12:50
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
It's explained in the documentation?
– whosrdaddy
Nov 9 at 12:23
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This question already has an answer here:
How to append one array to another array of same type in Delphi?
3 answers
Is their any helper to concatenate 2 arrays? I mean an helper to add all the elements of array1 to the end of array2 ?
array1: array of integer;
array2: array of integer;
delphi pascal
This question already has an answer here:
How to append one array to another array of same type in Delphi?
3 answers
Is their any helper to concatenate 2 arrays? I mean an helper to add all the elements of array1 to the end of array2 ?
array1: array of integer;
array2: array of integer;
This question already has an answer here:
How to append one array to another array of same type in Delphi?
3 answers
delphi pascal
delphi pascal
asked Nov 9 at 12:12
loki
2,56821045
2,56821045
marked as duplicate by whosrdaddy, LU RD
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 9 at 12:50
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by whosrdaddy, LU RD
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 9 at 12:50
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
It's explained in the documentation?
– whosrdaddy
Nov 9 at 12:23
add a comment |
1
It's explained in the documentation?
– whosrdaddy
Nov 9 at 12:23
1
1
It's explained in the documentation?
– whosrdaddy
Nov 9 at 12:23
It's explained in the documentation?
– whosrdaddy
Nov 9 at 12:23
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
If you have a fairly new Delphi (XE7 as per comments), you can just do it like this:
PROCEDURE Test;
TYPE
TIntArr = TArray<INTEGER>;
VAR
A1,A2 : TIntArr;
BEGIN
SetLength(A1,20);
SetLength(A2,30);
A1:=A1+A2
END;
ie. simple addition.
2
No, it's XE7 and later
– David Heffernan
Nov 9 at 12:32
Pre XE7 example was provided in the dupe...
– whosrdaddy
Nov 9 at 12:38
2
No need to define a custom type.
– Andreas Rejbrand
Nov 9 at 13:48
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
If you have a fairly new Delphi (XE7 as per comments), you can just do it like this:
PROCEDURE Test;
TYPE
TIntArr = TArray<INTEGER>;
VAR
A1,A2 : TIntArr;
BEGIN
SetLength(A1,20);
SetLength(A2,30);
A1:=A1+A2
END;
ie. simple addition.
2
No, it's XE7 and later
– David Heffernan
Nov 9 at 12:32
Pre XE7 example was provided in the dupe...
– whosrdaddy
Nov 9 at 12:38
2
No need to define a custom type.
– Andreas Rejbrand
Nov 9 at 13:48
add a comment |
up vote
2
down vote
accepted
If you have a fairly new Delphi (XE7 as per comments), you can just do it like this:
PROCEDURE Test;
TYPE
TIntArr = TArray<INTEGER>;
VAR
A1,A2 : TIntArr;
BEGIN
SetLength(A1,20);
SetLength(A2,30);
A1:=A1+A2
END;
ie. simple addition.
2
No, it's XE7 and later
– David Heffernan
Nov 9 at 12:32
Pre XE7 example was provided in the dupe...
– whosrdaddy
Nov 9 at 12:38
2
No need to define a custom type.
– Andreas Rejbrand
Nov 9 at 13:48
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
If you have a fairly new Delphi (XE7 as per comments), you can just do it like this:
PROCEDURE Test;
TYPE
TIntArr = TArray<INTEGER>;
VAR
A1,A2 : TIntArr;
BEGIN
SetLength(A1,20);
SetLength(A2,30);
A1:=A1+A2
END;
ie. simple addition.
If you have a fairly new Delphi (XE7 as per comments), you can just do it like this:
PROCEDURE Test;
TYPE
TIntArr = TArray<INTEGER>;
VAR
A1,A2 : TIntArr;
BEGIN
SetLength(A1,20);
SetLength(A2,30);
A1:=A1+A2
END;
ie. simple addition.
edited Nov 9 at 12:57
answered Nov 9 at 12:20
HeartWare
4,15811725
4,15811725
2
No, it's XE7 and later
– David Heffernan
Nov 9 at 12:32
Pre XE7 example was provided in the dupe...
– whosrdaddy
Nov 9 at 12:38
2
No need to define a custom type.
– Andreas Rejbrand
Nov 9 at 13:48
add a comment |
2
No, it's XE7 and later
– David Heffernan
Nov 9 at 12:32
Pre XE7 example was provided in the dupe...
– whosrdaddy
Nov 9 at 12:38
2
No need to define a custom type.
– Andreas Rejbrand
Nov 9 at 13:48
2
2
No, it's XE7 and later
– David Heffernan
Nov 9 at 12:32
No, it's XE7 and later
– David Heffernan
Nov 9 at 12:32
Pre XE7 example was provided in the dupe...
– whosrdaddy
Nov 9 at 12:38
Pre XE7 example was provided in the dupe...
– whosrdaddy
Nov 9 at 12:38
2
2
No need to define a custom type.
– Andreas Rejbrand
Nov 9 at 13:48
No need to define a custom type.
– Andreas Rejbrand
Nov 9 at 13:48
add a comment |
1
It's explained in the documentation?
– whosrdaddy
Nov 9 at 12:23