>>The ADIR() does create array if it doesn't exists but it'll not change existing memory variable to array type. Anyway, it's good programming practice to declare all variables and arrays before using them.
>
>I think it would be best if I declare the array variable first in all cases and not take any chances.
Make it LOCAL to avoid any conflicts.
LOCAL aPatientFiles[1]
nNumberOfPATFiles=ADIR(aPatientFiles, "*.PAT")
--sb--