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 contains
> explorers
> and the time I trying to search
> expl
> the error
> list-ref: index 9 too large for list: (#\e #\x #\p #\l #\o #\r #\e #\r #\s)
> is arise on
> (equal? last-char (list-ref data (+ index len -1))))
> but the wierd thing is that
> when the text.txt file contains
> 2explorers
> and when I am trying to find
> 2explorer
> no error arise
> but
> finding 2explorers returns 0 Found

Test cases! Test cases!

If you're not familiar with How To Design Program's "design recipe", I 
*strongly* urge you to have a look. Its authors are also the authors of 
DrRacket.

http://www.htdp.org

John Clements

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to