Hello, I am trying to define a word that acts like ." but will call an extra word on execution, i have called it d". I copied the code for ." from the kernel to test but it says it cant find the word compile ? I checked other dictionaries, checked the manual, I am at the limit of my understanding with ndcs and would be most grateful if anyone could help :)
: (d"-run) ( -- )
\ Runtime action of d"
r> count 2dup + aligned >r type
[char] " word $. ;
ndcs: ( -- ) discard-sinline compile (d"-run) ", ;