slang-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] Bug in try-finally


Hi,

can someone explain this behaviour?

#v+
define g_message()
{
    try {
        message("before return");
        return "boogie message";
    } finally {
        message("finally");
    }

    message("before return dflt");
    return "default message";
}

define msg(arg) { message(arg); }
define g_msg()
{
    try {
        msg("before return");
        return "boogie msg";
    } finally {
        msg("finally");
    }

    msg("before return dflt");
    return "default message";
}

message( g_message("xxx") );
message("--------------");
message( g_msg("xxx") );
#v-

#v+
% slsh /tmp/test.sl
before return
finally
boogie message
--------------
before return
finally
before return dflt
default message
% slsh --version
slsh version 0.7.5-0
S-Lang Library Version: 2.0.6
#v-

Why g_msg() continues after the finally?

Bye, Jörg.
-- 
Gott hat den Menschen erschaffen, weil er vom Affen enttäuscht war.
Danach hat er auf weitere Experimente verzichtet.
                                                          (Mark Twain)

_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]