I. Oppenheim writes:
|
| And what about:
|
| A B C D\
| E:|

Yup.  But we have had a discussion of what should  decide  this  one:
There  is  some  confusion  over just what is the "next line" for the
purposes of a final \.  Some abc software tries to find the next line
"of the same type". This turns out to be hopelessly confusing, and no
two programs do it the same.

This has been hashed out in any number of programming languages,  and
the  best  solution is always the same:  Standardize on the rule that
the continuation is *always* the next line.  Users can understand and
use this; they can't use anything that attempts to be more clever.

This also makes life very easy for implementers.  The trailing \ can
be handled in the input routine, before any parsing is done, and the
rest of the code then just sees:
  A B C D E:|

With this rule, it's clear that the first example doesn't contain  an
E:  line at all (though this sentence does ;-). The "E:" isn't at the
start of a line,  from  the  viewpoint  of  anything  but  the  input
routine, because it's a continuation of the previous line.

One of the minor incompatibilities among current abc programs is  the
different  ways  this is handled.  The best solution would be to just
declare the above rule, and encourage  programmers  to  change  their
code  to  do it that way.  It will mean that some abc will have to be
changed.  Thus, abc2ps attempts to match a continued  line  of  music
with  the  next  line  of  music,  so  you'd  see music and w:  lines
intermingled.  This was just too confusing, and produced  songs  with
lyrics  that  didn't work for other people.  So I changed jcabc2ps to
use the simple rule. I had to rewrite a few songs.  But the result is
much  easier to read.  And I no longer have to experiment to find the
line order that works.

This change turned out to be rather trivial to code.  I just modified
the  input  routine  to  recognize the trailing \ and append the next
line.  The rest of the program now never sees trailing \  chars,  and
the previous confusing handling of it just never happens.

To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

Reply via email to