From: Enoch <ix...@ho...> - 2013-03-22 17:53:33
|
Hello Matthias & All: Matthias Trute <mt...@we...> writes: > Hi Enoch, > > >> In the best Forth tradition let this "autoscope" be initially a NOP and >> allow the programmer to introduce whatever naming scheme he/she desires >> via a subsequent IS. > > A better place for such a hook would be (CREATE) (same asm file). And > the default should be the standard behaviour (get-current). > >> Am I missing something? Did I reinvent the wheel? :-) > > I think you solve a problem, nobody else has ;) We'll see how > much response you'll get.. *Thanks for the encouragement* I prepared a kernel patch, it's very simple, but ain't working, for some stupid reason, I guess :) The kernel patch is here: http://pastebin.com/8MShMtn4 (Sorry Erich, there's no other way with patches, unless you allow me to insert uuencoded text here). Here's a simple test case. ---------------------------------------------------------------------- wordlist constant private : scope ( c-addr u -- c-addr u wid ) over c@ [char] ~ = if private else get-current then ; ' scope is wlscope Trying to create anything "private" (e.g., 100 constant ~test) renders the dictionary inaccssible. Otherwise it functions as usual. ---------------------------------------------------------------------- I guess that without the Studio (i.e., going to the dark Windows side) I won't be able to figure this out, so please help. Thanks, Enoch. |