Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #59043

Re: accessing current xt

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: accessing current xt
Date 2017-05-11 06:39 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2017May11.083951@mips.complang.tuwien.ac.at> (permalink)
References <oevetu$ivi$1@dont-email.me>

Show all headers | View raw


Andreas Klimas <klimas@w3group.de> writes:
>is it possible to access the name of the word beeing compiled ?

In both Gforth and SwiftForth, LAST @ gives you the nt of the most
recent definition (including the nt of the current definition while in
the definition.  So

last @ name>string type

prints the name.

>fictive example
>
>: log current-xt >name .log ; immediate
>
>: foo log   ... ;

One approach that has not been mentioned by others is that LOG could
access the current line and scan back from the >IN position to the
name before LOG.  That would be standard.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2017: http://www.euroforth.org/ef17/

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

accessing current xt Andreas Klimas <klimas@w3group.de> - 2017-05-10 18:28 +0200
  Re: accessing current xt Mark Wills <markwills1970@gmail.com> - 2017-05-10 11:11 -0700
    Re: accessing current xt Mark Wills <markwills1970@gmail.com> - 2017-05-10 11:16 -0700
    Re: accessing current xt Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-10 20:20 +0200
    Re: accessing current xt Andreas Klimas <klimas@w3group.de> - 2017-05-10 21:48 +0200
      Re: accessing current xt pahihu <pahihu@gmail.com> - 2017-05-10 13:12 -0700
        Re: accessing current xt Andreas Klimas <klimas@w3group.de> - 2017-05-11 00:12 +0200
      Re: accessing current xt "Elizabeth D. Rather" <erather@forth.com> - 2017-05-10 15:14 -1000
        Re: accessing current xt Andreas Klimas <klimas@w3group.de> - 2017-05-11 09:57 +0200
          Re: accessing current xt "Elizabeth D. Rather" <erather@forth.com> - 2017-05-11 21:33 -1000
  accessing current xt gwj.nexus@gmail.com - 2017-05-10 12:56 -0700
    Re: accessing current xt Andreas Klimas <klimas@w3group.de> - 2017-05-11 00:12 +0200
      Re: accessing current xt gwj.nexus@gmail.com - 2017-05-10 22:57 -0700
  Re: accessing current xt anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-11 06:39 +0000
  Re: accessing current xt humptydumpty <ouatubi@gmail.com> - 2017-05-11 00:21 -0700
    Re: accessing current xt Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-11 09:38 +0200
      Re: accessing current xt humptydumpty <ouatubi@gmail.com> - 2017-05-11 00:49 -0700
        Re: accessing current xt Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-11 10:38 +0200
          Re: accessing current xt Julian Fondren <julian.fondren@gmail.com> - 2017-05-11 04:11 -0700
            Re: accessing current xt Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-11 14:32 +0200

csiph-web