words:scan
: scan ( addr len c -- addr' len' ) \ Within the string given by ADDR and LEN scan for the first occurances \ of character C. Return the remaining string denoted by ADDR' and LEN'. >R BEGIN ( addr len ) DUP WHILE ( addr len ) OVER C@ R@ - WHILE 1 /STRING REPEAT THEN R> DROP ;
Tags: ANS-Forth string outer-interpreter WORD
words/scan.txt · Zuletzt geändert: 2010-12-29 18:12 von 127.0.0.1