Original date:2019-12-02 23:38:23 Edited by: petelomax Subject: Re: Phix : string type -> type check failure

What exactly is FileDlg()? That's the thing that should be fixed, not get_file_name().

I have had a fair few of these in Edita/Edix, and if you don't stamp on them at source you end up chasing your own tail, and making a complete mockery of having a string type in the first place.

A routine that returns a qword sequence when it should/may as well return a string is wasting 7 out of every 8 bytes, or 87.5% of memory (on 64-bit, obviously a mere 75% on 32-bit).

Besides, who wants to see that mess in their ex.err when it could have

    path = `C:\Phix\Programs\EUWinGUI\EWG-Designer\Projects\VetAnalyser\AllWork-Sept-Nov.csv` 

EDIT: My C:\Program Files (x86)\Phix\demo\tinEWGdemo\tinewg.ew/FileDlg() almost has this, I have added the commented-out file = {} to indicate the sort of thing I was looking for

    if file=0 then 
        file = "" 
        index = 0 
--      file = {} 
        file = "" 
        while peek(szPointer_file+index)>0 do 
            file = file&peek(szPointer_file+index) 
            index += 1 
        end while 
    end if 
Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu