\ \ Example 2 (2.4th) \ 95 jun 26 \ INCLUDE crimcomp.4th \ Remember, the ugly stuff below is not the "real" incarnation of \ Crim, just a practical (?!?!?!) way to avoid entering all the \ byte values one by one. : SBRANCH ( s // -- s+1+displ // ) S@S1, S> + >S ; : S0BRANCH ( s // bool -- s+1|s+1+displ // ) IF S> 1+ >S ELSE SBRANCH THEN ; : S<."> ( s // -- s+1+len // ) S> COUNT 2DUP TYPE + >S ; : IN[,] ( b a c -- a<=b<=c ) 1+ WITHIN ; CLEAR-CRIM-SPACE ' S@U1, %-> %S@U1, ' = %-> %= ' IN[,] %-> %IN[,] %:RSR %BRANCH ' SBRANCH %-> %SBRANCH %:RSR %0BRANCH ' S0BRANCH %-> %S0BRANCH %:RSR %<."> ' S<."> %-> %S<."> 0 %VALUE %CASE-V %:RSR %CZ= %H_CRIM %CASE-V %S@U1, %= %S0BRANCH %; %:RSR %CZIN[,] %H_CRIM %CASE-V %S@U1, %S@U1, %IN[,] %S0BRANCH %; %: %CLASSIFY %2NDHEAD %CASE-V %CZIN[,] ASCII 0 CRIM1, ASCII 9 CRIM1, %M> %<."> S" digit" CRIMC$, %BRANCH %M> SWAP %R> %CZ= BL CRIM1, %M> %<."> S" space" CRIMC$, %BRANCH %M> SWAP %R> %<."> S" not digit or space" CRIMC$, %R> %R> %; : CLASSIFY ( c -- ) %' %CLASSIFY CALL-CRIM ; ASCII ! CLASSIFY \ should answer "not digit or space"