Hi Bruce,

Our thinking has probably evolved some over time. Where we started was: there 
was a strong desire to not add new types to the language, and some leftover 
UNIX wishful thinking in the type system in that almost all forms of I/O are 
implemented as a "file"...so type(x) returns "file" for many/most I/O things.  
image() generally returns more information than type(), and I would expect 
image(openfile) is where you might successfully argue that we should produce 
more details than we currently do. What runtime errors write out certainly 
demonstrates that the information is in there somewhere that image() could use.

Clint
________________________________
From: Bruce & Breeanna Rennie [bren...@dcsi.net.au]
Sent: Saturday, June 08, 2013 6:57 AM
To: Unicon group
Subject: [Unicon-group] Question relating to type of open file

To all,

When using the function type on a file, it returns the value "file". However, I 
have noticed that if an error occurs, the runtime is able to tell me how I 
opened the file. That is in the case of a DBM file, it shows the value 
"dbmfile".

The interesting thing is that stat(openfile) where openfile is a DBM file open 
with "d", returns run-time error 174

invalid file operation on directory or database
offending value: dbmfile(/home/bruce/.unicon/Unicon.config)
Traceback:
   main()
   stat(dbmfile(/home/bruce/.unicon/Unicon.config))

any suggestions here? Or is this requiring a change to the runtime to give more 
information?

regards

Bruce Rennie
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to