Re: Nexus Radio Final Released
- Posted by CChris <christian.cuvier at agric?lture.gouv.fr> Jul 06, 2007
- 628 views
don cole wrote: > > This dosen't have any thing to do with Watcon but I am having trouble with > get.e. > > My code: > Under Windows: > }}} <eucode> > > global function load(sequence fileName) > object fn, seq > fn=open(fileName,"r") > -- fn=3 here so db_create() and my_open() are not involed > if fn=-1 then > db_create(fileName) > fn=my_open(fileName,"r") > end if > seq=get(fn) > if seq[1]=GET_SUCCESS then -- (0) -- GET_SUCCESS = 0 > close(fn) > return seq[2] > elsif seq[1]=GET_EOF then -- (-1) -- GET_EOF = -1 > if platform()=DOS32 then > set_active_page(0) > set_display_page(0) > end if > puts(1,"GET_EOF ERROR") > return "GET_EOF ERROR" > elsif seq[1]=GET_FAIL then -- (1) -- GET_FAIL = 1 > printf(1,"in GET_FAIL fn=%d \n",{fn}) > if platform()=DOS32 then > set_active_page(0) > set_display_page(0) > end if > puts(1,"GET_FAIL") > return "GET_FAIL" > end if > end function > > sequence info > > info=load("Arwen.ew") > > ?info > </eucode> {{{ > > I always returns GET_FAIL. The file is there it returns fn=3 ??C > > Bouzy wrote: > > > > Hi DB, > > > > Thank you for the feedback but I was not able to reproduce the error on two > > different machines. I changed both the DPI and browser font and the layout > > of > > the site remained the same. I also viewed the site in different browsers > > with > > no change to the layout. But I am not worried either way because very few > > users > > change their DPI to higher values. > > > > ~C. Bouzy > > > > "If you do what you have always done, you will get what you always got." > > > Don Cole Could you post the first line(s) of the file you are trying to read from, as they appear in Notepad for instance? get() reads a valid Euphoria object string representation (the kind sprint() returns), otherwise it fails. So if the first line is, say "include dll.e", the string "include" is not an object representation and get() returns {GET_FAIL,whatever}. If you want the first line of the file returned, use gets() instead. Otherwise, I am not sure of what you want to achieve. CChris