flagxor / ueforth

Apache License 2.0
90 stars 26 forks source link

in V 7.0.7.4, CASE...ENDCASE has a bug..... #32

Closed MPETREMANN11 closed 1 year ago

MPETREMANN11 commented 1 year ago

Hello Brad, Your version of CASE OF ENDOF ENDCASE has a bug. I have tried this simple code: : day ( n -- addr len ) CASE 0 OF s" Sunday" ENDOF 1 OF s" Monday" ENDOF 2 OF s" Tuesday" ENDOF 3 OF s" Wednesday" ENDOF 4 OF s" Thursday" ENDOF 5 OF s" Friday" ENDOF 6 OF s" Saturday" ENDOF ENDCASE ;

And the leghth of the string is poped from stack....

My version of case.endcase work fine: https://github.com/MPETREMANN11/ESP32forth/blob/main/tools/caseEndcase.txt

With best regards

MPETREMANN11 commented 1 year ago

work fine now