-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Your biggest advantage here is the fact that you can use strings as
case selectors (they are not an ordinal type and so cannot be used in
Pascal); otherwise:
CASE animalType OF
'lion', 'tiger': doCaseLionOrTiger;
'koala':
BEGIN
Frank-
Friday, March 4, 2005, 10:17:36 AM, you wrote:
FDEJ> I hate C, and all the "break"s that come with it...
Your bad attitude is showing ... learn to love the break statement.
The fall-through approach allows you to do some things that are not
(easily) doable in pascal:
switch animalType
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Oops, my bad. It's my Pascal background showing through ;-)
I hate C, and all the "break"s that come with it...
On Mar 4, 2005, at 12:57 PM, Alex Tweedly wrote:
No, that doesn't do the same thing.
The modified code will do something1, then fall through
Ken Ray wrote:
On 3/4/05 8:05 AM, "N" <[EMAIL PROTECTED]> wrote:
Prefered Behavior:
function doIt a
try
something 1, 2 ,3 , 4
something1 a, b,c
catch e
if e is not "123" and e is not "1234" then throw e
resume next
end try
End function
T
ments
all of which could possibly "throw" a 'RR' exception. However, I
would like to evaluate the error and if it was "expected" continue
processing at the next statement. This would be simular to the On
Error Resume Next and On Error Resume is Visual Basic 6
Frank-
Friday, March 4, 2005, 8:05:02 AM, you wrote:
FDEJ> catch e
FDEJ>if e is not "123" and e is not "1234" then throw e
FDEJ> end try
...and this looks like an obvious place to use (again, no time to test
right now - caveat coder)
catch e
switch e
case 123
On 3/4/05 8:05 AM, "N" <[EMAIL PROTECTED]> wrote:
> Prefered Behavior:
>
> function doIt a
>
> try
> something 1, 2 ,3 , 4
> something1 a, b,c
> catch e
> if e is not "123" and e is not "1234" then throw e
>
range question. I have several statements
all of which could possibly "throw" a 'RR' exception. However, I
would like to evaluate the error and if it was "expected" continue
processing at the next statement. This would be simular to the On
Error Resume Next
N wrote:
Okay this is a really strange question. I have several statements all of which could possibly
"throw" a 'RR' exception. However, I would like to evaluate the error and if it was
"expected" continue processing at the next statement. This would be simula
Okay this is a really strange question. I have several statements all of which
could possibly "throw" a 'RR' exception. However, I would like to evaluate the
error and if it was "expected" continue processing at the next statement. This
would be simular to t
10 matches
Mail list logo