Problems with open/direct/binary
[1/3] from: hugues:moisy:geosignal at: 23-Dec-2002 17:15
Hi all,
I've a problem with the /direct refinement in 'open.
I just want to read a binary file (dbase in this case). It worked fine for a time and
suddenly when i launched my program in view, this error occured, and accurs again and
again.
** Script Error: open has no refinement called direct
** Where: getfields
** Near: dbff: open/direct/binary do rejoin ["%/" psource ".dbf"]
>>
when i do this directly in the console, it works fine (as before) ?
Anyone knows what happens ? If i reboot it doesn't change anything !
Thanks.
Hugues.
[2/3] from: sunandadh::aol::com at: 23-Dec-2002 11:26
Hugues
> Anyone knows what happens
is it possible that somewhere else in the script you have redefined 'open? eg:
open: %my-file instead of open my-file
Check with source -- an unmodifed 'open should look like:
>> source open
open: native [
"Opens a new port connection."
spec [file! url! port! object! block!]
/binary "Preserves contents exactly."
/string "Translates all line terminators."
/direct "Opens the port without buffering."
/new "Creates a file. (Need not already exist.)"
/read "Read only. Disables write operations."
/write "Write only. Disables read operations."
/no-wait "Returns immediately without waiting if no data."
/lines "Handles data as lines."
/with "Specifies alternate line termination."
end-of-line [char! string!]
/allow "Specifies the protection attributes when created."
access [block!]
/mode "Block of above refinements."
args [block!]
/custom "Allows special refinements."
params [block!]
/skip "Skips a number of bytes."
length [number!]
]
Sunanda.
[3/3] from: hugues:moisy:geosignal at: 24-Dec-2002 9:40
Thanks Sunanda,
I've found that I changed a function's name just before from "new" to
open
. It was just that.
Regards. And Merry Christmas, where you are. :=)
Hugues.