Discussion:
Lab1
(too old to reply)
Ryan Blatz
2005-10-07 00:15:02 UTC
Permalink
I'm a little confused about Remove_First_Word, I would think that word
would have some punctuation as it's suffix, since we are looking for
"from " for the envelope-From header, but in the spec for
Remove_First_Word it says

"there exists c: character
(<c> is prefix of t and
c is in punctuation))"

Which leads me to believe that t should have the punctuation that
seperated our first word.
Wayne D. Heym
2005-10-07 00:22:03 UTC
Permalink
Post by Ryan Blatz
I'm a little confused about Remove_First_Word, I would think that word
would have some punctuation as it's suffix, since we are looking for
"from " for the envelope-From header,
You are right to avoid wishful thinking by reading and understanding the
spec . . .
Post by Ryan Blatz
but in the spec for Remove_First_Word it says
"there exists c: character
(<c> is prefix of t and
c is in punctuation))"
Which leads me to believe that t should have the punctuation that
separated our first word.
. . . and you understood it well. You're exactly right: the outgoing
value of t contains as its first character the punctuation mark that
indicated the end of the word.

So, if a non-empty word w comes out of Remove_First_Word, then if that
word is "From" and the first character of t is the blank character, then
you have an envelope-From line.
--
Wayne
Loading...