The script below runs perfectly as converted or unconverted in line basic. I can run it as many times as I want and it will open the selected file with acrobat. When I strip out Alpha's "ax" error trapping the program will run the first time. If I run it again it will produce a fatal error. The fatal error appears immediately upon running the program. This happens every time.
alpha error
ALPHA5 caused an invalid page fault in
module MSVCRT40.DLL at 015f:1021d7f3.
it's running fine but I was wondering what's going on with Alpha's "ax" code.
DIM ax_choice as C
DIM ax_response as N
DIM ax_dialog as P
and all the rest
I was under the impression that it was basically for error trapping, but the situation I just described sounds like there's more to it than that. I repeat it's not a problem but if somebody knows the answer I am very curious.
DIM file_names[250] AS C
old_directory = dir_get()
dirname = "c:alphadoc11025"
dir_put(dirname)
'***populate the array
files = filefind.first("*.pdf")
I = 1
WHILE .not. files.eof()
file_names[I] = files.name()
files.next()
I = I + 1
END WHILE
'***allow user to choose and cleanup
dir_put(old_directory)
sort_array("file_names")
result = ui_get_list_array("Select ",1,"file_names")
if alltrim(result) = "" then
goto alldone
end if
delete file_names
delete files
'*** read the selected file with Acrobat
progname = "C:Program FilesAdobeAcrobat 4.0ReaderAcroRd32.exe "
dirname = dirname + chr(92)
filename = alltrim(result)
command = progname + dirname + filename
sys_shell(command,3)
alldone:
end
alpha error
ALPHA5 caused an invalid page fault in
module MSVCRT40.DLL at 015f:1021d7f3.
it's running fine but I was wondering what's going on with Alpha's "ax" code.
DIM ax_choice as C
DIM ax_response as N
DIM ax_dialog as P
and all the rest
I was under the impression that it was basically for error trapping, but the situation I just described sounds like there's more to it than that. I repeat it's not a problem but if somebody knows the answer I am very curious.
DIM file_names[250] AS C
old_directory = dir_get()
dirname = "c:alphadoc11025"
dir_put(dirname)
'***populate the array
files = filefind.first("*.pdf")
I = 1
WHILE .not. files.eof()
file_names[I] = files.name()
files.next()
I = I + 1
END WHILE
'***allow user to choose and cleanup
dir_put(old_directory)
sort_array("file_names")
result = ui_get_list_array("Select ",1,"file_names")
if alltrim(result) = "" then
goto alldone
end if
delete file_names
delete files
'*** read the selected file with Acrobat
progname = "C:Program FilesAdobeAcrobat 4.0ReaderAcroRd32.exe "
dirname = dirname + chr(92)
filename = alltrim(result)
command = progname + dirname + filename
sys_shell(command,3)
alldone:
end
Comment