Re: Using include-file

Liste des GroupesRevenir à cl forth 
Sujet : Re: Using include-file
De : ruvim.pinka (at) *nospam* gmail.com (Ruvim)
Groupes : comp.lang.forth
Date : 17. Sep 2024, 15:33:11
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vcc3v8$3hmr0$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
On 2024-09-04 15:13, dxf wrote:
On 3/09/2024 6:11 am, Ruvim wrote:
Do you know practical cases of using "include-file" in programs?
>
I can't imagine how this word could be used in standard programs.
...
 Here's a question.  Is there a temporal dependency on the 'fileid' passed
to INCLUDE-FILE ?
The section "11.6.1.1717 INCLUDE-FILE" [1] does not impose any such restriction on a program.
A general rule is that a standard program is allowed to do anything that is not explicitly prohibited for a program by the standard, a standard system is only allowed to do anything that is explicitly allowed for a system by the standard or undetectable by a standard program.

On my system 'fileid' for INCLUDE-FILE would need to represent the most
recently opened file.  Otherwise should a compilation error occur the wrong
statistics e.g. file-name will be printed.
A compilation error is an ambiguous condition, so the system is allowed to do whatever it wants. If the systems shows a wrong file name where an error occurred, this does not make it non-compliant.

AFAICS ANS only guarantees the contents of a file represented by 'fileid'.
The issue of filenames - if/when/how they're stored - is a detail left to the
implementer.  It's no problem for INCLUDED which binds opening of the file
with compilation.  However INCLUDE-FILE potentially separates these two.
 
Yes. OTOH, a system can obtain a file name from a file handle, see GetFileInformationByHandleEx in Windows, readlink on /proc/self/fd/NNN in POSIX.
--
Ruvim

Date Sujet#  Auteur
2 Sep 24 * Using include-file26Ruvim
2 Sep 24 +* Re: Using include-file7mhx
3 Sep 24 i`* Re: Using include-file6mhx
9 Nov 24 i `* Re: Using include-file5rt
9 Nov 24 i  `* Re: Using include-file4mhx
9 Nov 24 i   +* Re: Using include-file2Stephen Pelc
10 Nov 24 i   i`- Re: Using include-file1dxf
10 Nov 24 i   `- Re: Using include-file1rt
3 Sep 24 +* Re: Using include-file11Anton Ertl
3 Sep 24 i+* Re: Using include-file5albert
3 Sep 24 ii+* Re: Using include-file3mhx
3 Sep 24 iii`* Re: Using include-file2sjack
4 Sep 24 iii `- Re: Using include-file1dxf
4 Sep 24 ii`- Re: Using include-file1dxf
3 Sep 24 i`* Re: Using include-file5Ruvim
23 Oct 24 i `* Re: Using include-file4Ruvim
24 Oct 24 i  `* Re: Using include-file3Anton Ertl
24 Oct 24 i   +- Re: Using include-file1albert
26 Oct 24 i   `- Re: Using include-file1Ruvim
4 Sep 24 +* Re: Using include-file2Gerry Jackson
4 Sep 24 i`- Re: Using include-file1Gerry Jackson
4 Sep 24 +* Re: Using include-file2dxf
17 Sep 24 i`- Re: Using include-file1Ruvim
24 Oct 24 `* Re: Using include-file3minforth
27 Oct 24  `* Re: Using include-file2Ruvim
27 Oct 24   `- Re: Using include-file1minforth

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal