• There is an official forth suffix in linux

    From albert@spenarnc.xs4all.nl@21:1/5 to All on Thu May 22 17:18:54 2025
    The facility ctags has been written a long time ago. In the time that Forth
    was still popular.

    ctags collects the places where functions have been defined. Then you can instruct your editor to open the file with the function.

    'ctags -h' list a couple of dozen language with their official suffix.
    The recognized suffices for forth are (drumroll!) .fth and .tok.

    Indeed if you have a file fibonacci.fth under linux, gvim opens the file
    with appropriate syntax coloring, e.g. all comments are blue.

    You can force gvim to use forth syntax coloring. Also ctags can generate
    a tagsfile for your Forth source, irrespective of the extension you use.

    vfxforth and pforth use this suffix.
    John Hayes has published tests for ANSI compatiblity that use .fth.

    Time to have an entry in the make database:

    %: %.fth
    # recipe to execute (built-in):
    $(COMPILE.fth) -c $<

    to automatically built fibonacci from fibonacci.fth.

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to LIT on Fri May 23 13:14:00 2025
    In article <52793264434783d786dbaa2d78074811@www.novabbs.com>,
    LIT <zbigniew2011@gmail.com> wrote:
    Indeed if you have a file fibonacci.fth under linux, gvim opens the file
    with appropriate syntax coloring, e.g. all comments are blue.

    Say what? What 'syntax'? :D

    Oh, you meant the comments? ;)

    I don't care much for syntax coloring. Comments may be the main
    reason. Many people like it. And that wasn't the point of my post
    anyway.
    But there is much more.

    1. control words stand out.
    2. most ISO words are identified.
    3. Identifying defining words and the name which is defined with separate colors is useful. (not that this is done).

    Example
    : aap we gaan naar Rome :
    : noot we gaan ook naar Rome ;

    aap and noot should be in bright red. noot isn't
    because you typed a colon instead of a semicolon.


    --

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)