octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue where return doesn't really return to octave prompt


From: jswensen
Subject: Issue where return doesn't really return to octave prompt
Date: Mon, 15 Aug 2005 11:27:56 -0600
User-agent: Internet Messaging Program (IMP) H3 (4.0.2) / FreeBSD-4.10

I am having an issue that has me baffled.  An apparently small change to code
causes very unexpected results.  The following snippet of code shows both the
case in which the problem does not occur and when it does occur.  Also, the
error does not occur in Linux or OSX, only in Cygwin.

DEFUN_DLD(hget,args,,"hget(handle,string)\n\
 gets a property for the given handle")
{

// Works here if uncommented
//return octave_value();

//  Get the 'figure' object from the HandleManager
handle* handlePtr = handle::getHandle( args(0).int_value() );

// Works here if uncommented
//return octave_value();

// Make sure the handle retrieved is a 'handle' object
if( (handlePtr != NULL) &&
        (handlePtr->type_id() == handle::static_type_id()) )
{
        // Works here if uncommented
        //return octave_value();

        string propName = args(1).string_value();

        // Fails here - never returns to the octave prompt
        return octave_value();
}
else
{
        error("handle: The handle id specified does not exist");
}

}

Any suggestions?

John Swensen

----------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]