gforth
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gforth] questions about callback#


From: Reepca Russelstein
Subject: [gforth] questions about callback#
Date: Tue, 31 Jul 2018 17:11:34 -0500

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]