2013/9/6 Mark Morgan Lloyd <markmll.fpc-pas...@telemetry.co.uk>

> I'm sure there isn't a single "right" answer to this question, but if
> transferring Pascal source to a system that enforces short lines (e.g. 78
> chars + CRLF) what's the best automatic breaking rule?
>
> One possibility is obviously to break after the rightmost space, but is it
> valid to break after e.g. . (if not followed by a digit), ^ and possibly
> others?
>
> Syntax errors are acceptable. Truncation isn't.
>

Yes.

You could also split after ] and := and ;

More tricky, you could recognize < < <> <= and <=

But your splitter must be able to know when it is inside a string (no
splitting) and outside. Which means your splitter should be able to
recognize the right quote too and split after it if suitable.

-- 
Frederic Da Vitoria
(davitof)

Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to