Hi! I know that there are some ways for copying (2d)arrays in pascal (I use borland pascal). One is to use for-loops and the other one is to use something like array1:=array2. That's what i know so far. Of course i know that there is the fillchar that fills an array with a specified character. I wonder how to do this without for-loops:
copy an array into another but only some elements. To be more specific, the array i want to copy is char type, and it has empty elements(even if you don't put something, the space itself is a character.)that i dont want to be copied to the other array. Until now I did this with for-loops:
for i:=1 to 10 do
for j:=1 to 10 do
if array1[i,j] <> ' ' do array2[i,j]:=array1[i,j];
Is there any way that i can do the same thing without for loops? With for loops its very very slow, but when use something like array1:=array2
its blazingly faster, but then you copy everything that array2 has, and I want NOT to copy the "empty" or " " characters (or any one else character that might be specified). Hope you understand what I am saying...