Re: Using include-file

Liste des GroupesRevenir à cl forth 
Sujet : Re: Using include-file
De : mhx (at) *nospam* iae.nl (mhx)
Groupes : comp.lang.forth
Date : 02. Sep 2024, 22:22:14
Autres entêtes
Organisation : novaBBS
Message-ID : <acb9c2da96f73f53b88ecc583e95cf55@www.novabbs.com>
References : 1
User-Agent : Rocksolid Light
On Mon, 2 Sep 2024 20:11:25 +0000, Ruvim wrote:

Do you know practical cases of using "include-file" in programs?
>
[..]
Using other system-specific means, this word can probably be used to
organize inter-process communication: when a file descriptor (e.g. a
pipe) is passed from one process to another and used as the input
source.  But why do you need to load Forth code this way?
My SPICE simulator INCLUDE's pre-processed netlists.
A pre-processor takes (again, INCLUDE's) the industrial-standard
netlist and rewrites it to Forth.
One can also write the netlist directly using Forth, but not
every engineer is able or willing to do that.
Debugging is easy: the original netlist runs on standard SPICE
programs and its results can be compared directly to iSPICE's
output when it uses the pre-processed netlist.
The principle works for other applications too. Here some
examples from my dfwforth/include directory:
FORTH> grep "INCLUDE" /mnt/d/dfwforth/include/*.frt
/assemble.frt:319:               =ASM-NAME COUNT  INCLUDED
/backtrac.frt:132:       ['] INCLUDE-FILE OF
/dialogs.frt:116:        R> COUNT INCLUDED
/eplot.frt:777:          SWAP @ ?DUP IF COUNT INCLUDED ( header) ENDIF
/eplot.frt:796:          SWAP @ ?DUP IF COUNT INCLUDED ( header) ENDIF
/eplot.frt:819:          SWAP @ ?DUP IF COUNT INCLUDED ( header) ENDIF
/eplot.frt:838:          SWAP @+ SWAP >S  ?DUP IF COUNT INCLUDED ( head
/eplot.frt:882:          :headname @ ?DUP IF COUNT INCLUDED
/eplot.frt:895:          :dataname @ COUNT INCLUDED ;
/graphbench.frt:261:#63 #check [IF]      INCLUDE gtk3/benchmarks.frt [T
/iwords1.frt:4:CR .( FORTH.LOG : edit out garbage first, then INCLUDE i
/lprof.frt:357:\ Instead of INCLUDE name , IN name , S" name" INCLUDED
/lprof.frt:367:            S" !!!!!!!!.$$$" INCLUDED
/lprofile.frt:198:\ Instead of INCLUDE name , IN name , S" name" INCLUD
/lprofile.frt:207:               S" !!!!!!!!.$$$" INCLUDED ;
/playwav.frt:17:[IF]     INCLUDE pwavlinu.frt
/playwav.frt:21:[IF]     INCLUDE pwavlinu.frt
/playwav.frt:25:[IF]     INCLUDE pwavewin.frt
/runsteady.frt:620:             inpbuf #11 cnt MIN S" *| INCLUDE " COMP
/syssim.frt:772: EVAL" ANEW __syssim__" S" spf_model.frt" INCLUDED ;
/syssim.frt:812: CR ." SPF-INCLUDE   -- load spf_model.frt control/simu
-marcel

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