Ole Braad-Sørensen wrote:
> On Tue, 12 May 2009 12:00:01 +0000, you wrote:
>
>> Possibly you need breaks? :-)
>>
>> switch(RqType)
>> {
>> case smtpConnect: SMTP->Helo(); break;
>> case smtpHelo: SMTP->MailFrom(); break;
>> case smtpEhlo: SMTP->Auth(); break;
>> case smtpAuth: SMTP->MailFrom(); break;
>> case smtpMailFrom: SMTP->RcptTo(); break;
>> case smtpRcptTo: SMTP->Data(); break;
>> case smtpData: SMTP->Quit(); break;
>> }
>
> No. Tried this too.
Really?
> The breaks has no effect in this "switch"
> ( No "default" value )
AFAIK it doesn't matter whether there is a default or not.
There's nothing in the documentation mentioning this but:
"To avoid evaluating any other cases and relinquish control
from the switch, terminate each case with break."
So please try again, it works fine with the breaks!
--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be