On May 20, 2011, at 1:48 AM, 김태윤 wrote:
> hello
> I am trying to make little human like text searching program
> but there's bug that I can't catch for many hours
> the bug is
> when text.txt file contains
> explorer
> and when I am trying to find
> exp
> then error arise
> when the text.txt cont
It seems your input data is not right here. I use your code (see below), it
works well (besides the overflow problem).
#lang racket
;it is list operation though parameter is str
;as little like human, check first and last character first
(define count 0)
(define data (string->list "explorers"))
(d
A quick look.
You're not guarding the list end ( (+ index len - 1) should be also less
than data-len), that's why you have index overflow error. Then when you
tried to search "2explorer" from "2explorers", the first turn of loop
failed, then the second turn of loop failed on "(equal? first-char (li
hello
I am trying to make little human like text searching program
but there's bug that I can't catch for many hours
the bug is
when text.txt file contains
explorer
and when I am trying to find
exp
then error arise
when the text.txt contains
explorers
and the time I trying to search
expl
the error
4 matches
Mail list logo