1. New function: open95()
This may well be fixed in Euphoria 2.1, but here's a couple of functions
that might make life in DOS 7.xx (when Win95 is running) a little easier:
-- I quote these from memory, so there's probably a semantic error
-- somewhere in this lot <g>
function exist(sequence filename)
-- This works for long filenames too, although some may wish to use
-- Dir95()...
integer handle
handle = open(filename, "rb")
if handle != -1 then
return 1
close(handle)
end if
return 0
end function
function open95(sequence filename, sequence mode)
integer handle
if not length(filename) or not length(mode) then
return -1
end if
if mode[1] != 'r' then
if not exist(filename) then
-- Since Euphoria has difficulties creating LFNs,
-- make DOS do it for us!
system("rem > " & filename, 2)
end if
end if
handle = open(filename, mode)
return handle
end function
--
Carl R White -- Final Year Computer Science at the University of Bradford
E-mail...: cyrek- at -bigfoot.com -- Remove the hyphens before mailing. Ta :)
URL......: http://www.bigfoot.com/~cyrek/
Ykk rnyllaqur rgiokc cea nyemdok ymc giququezka caysgr -- B.Q.Vgesa