Author: Stan Eisenstat
Subject: Re: [Cs223] Infinite loop?
Date: Friday, 21 Feb 2020, 13:22:11
> Message Posted By: Emily
>
> The spec notes that "Some substitutions (e.g., "strwrs -s a a" applied to
> "a") would not normally terminate," and gives specific instances of this
> to handle (like when the line is unchanged). Do we need to handle other
> instances of infinite loops? ...
No.
=====
> ... I ran
> $ echo "abababa" | /c/cs223/Hwk3/strwrs -r ab aba
> in the terminal, and after 1-2 minutes of letting it go, I control C'd it.
> Is it okay for our code to do this too?
Yes. If you run with the -v option,
% echo "abababa" | /c/cs223/Hwk3/strwrs -r ab aba | more
you can see what strwrs is doing.
--Stan-
PREV
INDEX
NEXT