[m-users.] Correct use of pragma source_file and #N directives together ?

Tomas By tomas at basun.net
Wed Aug 17 20:02:51 AEST 2022


On Wed, 17 Aug 2022 11:49:50 +0200, Zoltan Somogyi wrote:
> [...] your tool will work for any literate program where each clause
> and directive is contiguous in the source code. This is as it should
> be: if you think you need to explain one half of a clause separately
> from its other half, then you probably should create a separate
> predicate for one half or the other.


No, it could just be that the procedure is especially complicated or
interesting, and you want to add some explanation or reference at that
exact place in the text.

It could also be that you have several pieces of code, in different
parts of the program, with some common purpose or context, and you
want them together in the printed document.

(But I don't see a need for keeping track of individual line numbers.)

/Tomas


More information about the users mailing list