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: John W. Eaton
Subject: Issue where return doesn't really return to octave prompt
Date: Mon, 15 Aug 2005 14:10:53 -0400

On 15-Aug-2005, address@hidden wrote:

| 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?

Are you sure the string_value function returns?

jwe



reply via email to

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