I want to take a string field and assign each position of the string to a position in an array. The size of the array needs to change with the string. I think I am close to making it work, however, The formula I have doesn't change the size of the array. What am I doing wrong? Here is the formula I am using (crystal syntax in v. 8.0):
numbervar totposit:=length({PR_PRINCIPAL.PRINC_NAME});
numbervar x:=1;
stringvar array a:="";
while x <= totposit do
(
a[x]:=mid({PR_PRINCIPAL.PRINC_NAME},x,1);
x:=x+1;
);
a[x];
The size of the array is not getting past 1? Do I need to assign a size to the array when I declare it? If so, how? I can't find anything on how to declare the size before-hand.
Thanks,
Chris
numbervar totposit:=length({PR_PRINCIPAL.PRINC_NAME});
numbervar x:=1;
stringvar array a:="";
while x <= totposit do
(
a[x]:=mid({PR_PRINCIPAL.PRINC_NAME},x,1);
x:=x+1;
);
a[x];
The size of the array is not getting past 1? Do I need to assign a size to the array when I declare it? If so, how? I can't find anything on how to declare the size before-hand.
Thanks,
Chris