octave-maintainers
[Top][All Lists]
Advanced

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

Re: Issue where return doesn't really return to octave prompt


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

I'm positive the string_value returns OK. I added the following just to verify.

Modified Code
------------------------------------
string propName = args(1).string_value();
cout << "Returned from string_value()" << endl;

// Fails here - never returns to the octave prompt
return octave_value(propName);

Octave Output
-----------------------------------
octave:1> hget(0,'DiaryFile')
Creating root object
After root init
Returned from string_value()


I suppose I could attach with the debugger and figure out where it is getting
stuck.  The problem is I don't think I built Octave with debugging symbols
included.

John


Quoting "John W. Eaton" <address@hidden>:

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]