[Coco] quick basic09 copy program
L. Curtis Boyle
curtisboyle at sasktel.net
Thu Jan 31 13:23:46 EST 2008
On Thu, 31 Jan 2008 04:47:47 -0600, Willard Goosey <goosey at virgo.sdc.org>
wrote:
> On Wed, Jan 30, 2008 at 09:05:58AM -0600, L. Curtis Boyle wrote:
>> I would definitely recommend in the startup file pre-loading the copy
>> command if you are going to do it this way...
>
> Yes, well, when I say "quick and dirty" I mean it. What can one do?
> I'm not, by any means, a BASIC-09 expert. Even this little program
> was a learning experience for me. ("Oh yeah, huh, GET returns as much
> as will fit in the var passed to it!" :)
> The guy seemed to have some weird aversion to using dsave or
> wildcards, and I mostly wrote it based off of some of my other
> BASIC-09 code. Which I found errors in by adapting to this. ;-)
>
>> How big are the files you are copying? You may be able to do
>> OPEN/CREATE's
>> with the GetStat/SetStat calls for I$Read/I$Write to do it a lot faster
>> than forking a shell which then forks copy for every file...
>
> Now, that would be a useful subroutine module to have around. Good
> idea!
>
> Willard
Using the I$ calls also means to you can DIM a byte array for the largest
size you need, but you can control the # of bytes read/written every time
you call it (unlike GET/PUT, which simply uses the variable's size). I
used this a lot when we still ran Coco's here at work for processing
data...
--
L. Curtis Boyle
More information about the Coco
mailing list