From: Piet de Arcilla on
On Sep 21, 4:20 pm, rossum <rossu...(a)coldmail.com> wrote:
> My comments should help you to redesign your program so that it works
> recursively.  We do not do your homework for you, but we do offer
> help.  It is up to you to use that help.

I have no compunction about doing his work for him; I'm just too lazy.

People say "what if this guy ended up next to you at work" but I don't
think anyone who can't do an assignment like this is ever going to
have a job as a professional programmer anyway.
From: Patricia Shanahan on
BobPalin wrote:
> On Sep 21, 1:03 pm, rossum <rossu...(a)coldmail.com> wrote:
>> On Mon, 21 Sep 2009 09:23:05 -0700 (PDT), BobPalin
>>
>> <bowlingbib...(a)yahoo.com> wrote:
>>> What we have to do is take one of our programs that we already turned
>>> in and make it use recursion. This program detects if a user entered
>>> word is a palindrome. Below is the code for the original program but
>>> we're stuck on how to do it using recursion. The part we need to
>>> change to recursion is commented out. Thanks!!
>> 1. A string "ABCDEFG" is a palindrome iff A = G and BCDEF is a
>> palindrome.
>>
>> 2. "A" is a palindrome for all A.
>>
>> 3. "" is a palindrome.
>>
>> rossum
>
> Sorry, it appears that I wasn't clear enough with my question. The
> program above tests to see if what the user inputted is a palindrome.
> What I need the program to do is the same thing, but recursively. The
> commented out area needs to be done using recursion. Any suggestions?

If you can't do it immediately in MIPS code from the hints above, I
suggest first writing it in whatever programming language you find
easiest. If you do not see the relationship between rossum's answer and
recursive code for palindrome testing, reading a bit about recursion may
also help.

Patricia
From: Chris on
On Sep 21, 4:55 pm, Piet de Arcilla <dearci...(a)gmail.com> wrote:
> On Sep 21, 4:20 pm, rossum <rossu...(a)coldmail.com> wrote:
>
> > My comments should help you to redesign your program so that it works
> > recursively.  We do not do your homework for you, but we do offer
> > help.  It is up to you to use that help.
>
> I have no compunction about doing his work for him; I'm just too lazy.
>
> People say "what if this guy ended up next to you at work" but I don't
> think anyone who can't do an assignment like this is ever going to
> have a job as a professional programmer anyway.

I'm sure you knew how to do recursion in mips when you were in college
From: Piet de Arcilla on
On Sep 21, 6:17 pm, Chris <cam5...(a)psu.edu> wrote:
> On Sep 21, 4:55 pm, Piet de Arcilla <dearci...(a)gmail.com> wrote:
>
> > On Sep 21, 4:20 pm, rossum <rossu...(a)coldmail.com> wrote:
>
> > > My comments should help you to redesign your program so that it works
> > > recursively.  We do not do your homework for you, but we do offer
> > > help.  It is up to you to use that help.
>
> > I have no compunction about doing his work for him; I'm just too lazy.
>
> > People say "what if this guy ended up next to you at work" but I don't
> > think anyone who can't do an assignment like this is ever going to
> > have a job as a professional programmer anyway.
>
> I'm sure you knew how to do recursion in mips when you were in college

Back then I knew powerpc and 680x0 assembler too.