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....
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