questions about callback#

Reepca Russelstein <[email protected]>
Newsgroups gmane.comp.lang.forth.gforth
Message-ID <CA+jmvS5aj76+e2M9dTLW-n6kMUvwC=31OcZrhP4h+TP22DGRfA@mail.gmail.com>
callback# is used both at generate-time (in words used by
callback-gen) and at first-instantiation-time. If the two values don't
match, bad things happen (in my case, I attempted to pass a function
pointer pointing to address 14. Yikes).

Example:

c-library test
3 to callback#
c-callback used-rarely -- void
20 to callback#
c-callback used-frequently n -- void
end-c-library

' noop used-rarely .

Prints 8 for me - it tries to access the 19th callback of
used-rarely... seems that ccb-num should be set at generate-time
rather than setup-time.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.