On Wed, Jul 16, 2003 at 11:07:51AM +0100, Jack Campin wrote: > >> Given that ABC is text-line-based, *can* a program go straight to a > >> tune, random-access-like, without having read all the intervening lines? > > random-access-"like"... yes, it's possible. My JedABC has an index mode > > that does what you want; so does BarFly in "Split Screen Mode". > > But BarFly will have read the entire file before it goes into split- > screen mode, and I suspect JedABC will have done too. You would need > something like ISAM to do what Richard is talking about, and I don't > think anybody is implementing ABC software in MVS Cobol or in S3 on > ICL VME.
Uh ? Are we at cross purposes here ? Read through the file, from 1st line to last line, keep a note of what "global" headers are in force, as each tune is met add these in as appropriate. Dunno about COBOL, I agree C is not the prettiest language for handling text, but surely it's not impossible ? Very simple in the "scriptier" languages, like perl for example. Or software that can read from standard input and has access to perl is very welcome to use abc-cat as a preprocessor (http://www.leeds.ac.uk/music/Inof/RRTuneBk/abcscripts) Of course, having done that, you need to stashthem in memory if you want later access tothem, but as you say ... > Richard's tunebook is the only ABC file I've got on this machine that > requires me to increase BarFly's memory allocation above the default > (and it's very slow to load). But with a modern machine you'd need > to have getting on for a gigabyte of ABC in one file before random > access mattered. I don't believe the entire world typing together > can create ABC source fast enough to out-scale the computer industry. ... they're not big. 1200 tunes, half a meg memory, the file in question (ish - I'm overdue an update, as usual). This is the old Mac systems issue, is it, of having to specify memory for each program individually ? I remember now, I used to split this file into alphabetically-sorted chunks so as to get smaller file sizes, mainly for Mac browsers with this feature, but I dropped it somewhere along the line because they way I was doing it was a nuisance to maintain. I'm not very keen to reinstate this, but will give it some thought if this issue is a general nuisance. Mac users ? -- Richard Robinson "The whole plan hinged upon the natural curiosity of potatoes" - S. Lem To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html