RESPCODE : Bload

new topic     » topic index » view thread      » older message » newer message

[ BLOAD ]
Greame posted
function bload(sequence path)
integer fn,c
sequence r

        r={}
        fn=open(path,"rb")
        c=getc(fn)               -- PROBLEM! What if the open failed?
        while c!=-1 do
                r=r&c
                c=getc(fn)
        end while
        return r
        end function

-- This should fix the problem of open failure.
----- *Untested Code* -----
function bload(sequence path)
integer fn,c
sequence r

        r = {}
        fn = open(path,"rb")
        c = fn
        while c != -1 do
                c = getc(fn)
                r = r&c
        end while
        return r
end function

-----
Sincerely,
Mathew Hounsell
Mat.Hounsell at Mailexcite.Com




Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu