>> While trying to validate my new ANS Forth implemention of StrongForth on
>> Win32Forth, I stumbled over an issue with (LOCAL). The generated code
>> didn't
>> work, and I finally found out that even the sample definition of LOCALS|
>> from appendix A15 of the ANS Forth spec doesn't work correctly:
>>
>> Win32Forth: a Forth for Windows 95/98/ME/NT/2K/XP
>> Version: 6.12.00 Build: 2
>> Compiled: Samstag, August 23 2008, 4:18
>> Platform: Windows XP, 821k bytes free
>> 2,885 Words in Application dictionary
>> 2,332 Words in System dictionary
>> 5,217 Words total in dictionaries
>> 20,312 Windows Constants available
>> Current directory: C:\Programme\Win32Forth\extsrc\wincon\winconcpp
>> Loading Win32For.CFG
>> Loading Win32ForUser.CFG
>>
>> Program path is: C:\Programme\Win32Forth\Win32For.EXE
>> Forth path is: C:\Programme\Win32Forth\
>> Application path is:
>>
>> System Editor is: Win32Forth IDE
>>
>> WARNING OFF SYS-WARNING-OFF ok
>> : EXAMPLE ( n -- n n**2 n**3 )
>> LOCALS| N | N DUP N * DUP N * ; ok
>> 5 EXAMPLE . . . 125 25 5 ok
>> : LOCALS| ( "
name...name |" -- )
>> BEGIN
>> BL WORD COUNT OVER C@
>> [CHAR] | - OVER 1 - OR
>> WHILE
>> (LOCAL)
>> REPEAT 2DROP 0 0 (LOCAL)
>> ; ok
>> IMMEDIATE ok
>> : EXAMPLE ( n -- n n**2 n**3 )
>> LOCALS| N | N DUP N * DUP N * ; ok
>> 5 EXAMPLE . . . 0 0 0
>> ^
>> Error(-4): . stack underflow
>> 4 5 EXAMPLE . . . 64 16 4 ok
>> .S empty ok
>>
>> It seems the runtime code of this redefined version of LOCALS| swallows
>> one
>> cell from the stack. Is this a known defect?
>>
>> Regards,
>> Stephan
> ...