I decided to do the only sensible thing with Forth strings: dodge the whole damn question. I implemented a p" word instead which puts a parrot string on the stack when the word its compiled into is executed. WIth that, and a few other bits of jiggery-pokery, I was good to go. And I do mean good--this code:
: loadcurses p" library/ncurses.pasm " loadpasm ;
: initscr p" ncurses::initscr " findglobal 0 preg invoke resultP ;
loadcurses
initscr
The next inevitable step is a full forth-based life program, as that's the inevitable demo. (It's the Programmer Magpie Effect :)
Posted by Dan at October 29, 2003 03:49 PM | TrackBack (0)That's beautiful! I can't wait to see how the rest of Parrot Forth turns out.
Posted by: Gnomon at October 30, 2003 03:04 PM