>>>> With SBYTES you can do something like SBYTES ram1_test,address,0
>>>> which
>>>> creates a not very useful zero length file. But if you try to 
>>>> LBYTES
>>>> it back with LBYTES ram1_test,address you get the error message 
>>>> 'end
>>>> of file'
>>>>
>>> Seems more like a statement of fact than an error msg.
>>>
>> Yes, quite right, I hadn't quite thought of it that way :-)
>>
> Absolutely not right. They is utterly no reason for an LBYTES of a 
> zero
> length file to report an error. You wouldn't think it appropriate if 
> it
> reported an error when asked to do a file of 5,373 bytes? Why should 
> 0
> bytes be treated as some magically special case?
>
> It's a bug.
Thanks Laurence. It's in SMSQ/E and a JM ROM on my Aurora, but I 
haven't tried a Minerva yet.

A general Q_ERR_ON catches it, but of course there's nothing to load 
so you may as well do nothing when the error is trapped I suppose. 
Anyway, no problem now I know what's happening.

I think the particular zero length files are created by a program 
which opens a channel to a file, something goes wrong when it tries to 
write to it and it immediately closes the file so of course you end up 
with a zero length file. They also occur in PD library catalogues 
where something like OPEN_NEW#3,'flp1_----------------------' : CLOSE 
#3 was used to create a divider line between groups of filenames on a 
disk.

-- 
Dilwyn Jones

_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to