Mercurial > hg > octave-nkf
comparison libinterp/octave-value/ov-java.cc @ 20766:0650b8431037
eliminate more simple uses of error_state
* besselj.cc, bitfcns.cc, utils.cc, chol.cc, ov-java.cc:
Eliminate simple uses of error_state.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 05 Oct 2015 21:37:03 -0400 |
parents | dd6345fd8a97 |
children |
comparison
equal
deleted
inserted
replaced
20765:1a0a433c8263 | 20766:0650b8431037 |
---|---|
829 for (int i = 0; i < idx.length (); i++) | 829 for (int i = 0; i < idx.length (); i++) |
830 try | 830 try |
831 { | 831 { |
832 idx_vector v = idx(i).index_vector (); | 832 idx_vector v = idx(i).index_vector (); |
833 | 833 |
834 if (! error_state) | 834 jintArray_ref i_array (jni_env, jni_env->NewIntArray (v.length ())); |
835 { | 835 jint *buf = jni_env->GetIntArrayElements (i_array, 0); |
836 jintArray_ref i_array (jni_env, jni_env->NewIntArray (v.length ())); | 836 |
837 jint *buf = jni_env->GetIntArrayElements (i_array, 0); | 837 for (int k = 0; k < v.length (); k++) |
838 | 838 buf[k] = v(k); |
839 for (int k = 0; k < v.length (); k++) | 839 |
840 buf[k] = v(k); | 840 jni_env->ReleaseIntArrayElements (i_array, buf, 0); |
841 | 841 jni_env->SetObjectArrayElement (retval, i, i_array); |
842 jni_env->ReleaseIntArrayElements (i_array, buf, 0); | 842 |
843 jni_env->SetObjectArrayElement (retval, i, i_array); | 843 check_exception (jni_env); |
844 | |
845 check_exception (jni_env); | |
846 | |
847 if (error_state) | |
848 break; | |
849 } | |
850 else | |
851 break; | |
852 } | 844 } |
853 catch (index_exception& e) | 845 catch (index_exception& e) |
854 { | 846 { |
855 // Rethrow to allow more info to be reported later. | 847 // Rethrow to allow more info to be reported later. |
856 e.set_pos_if_unset (idx.length (), i+1); | 848 e.set_pos_if_unset (idx.length (), i+1); |
866 { | 858 { |
867 octave_value retval; | 859 octave_value retval; |
868 jobject_ref resObj (jni_env); | 860 jobject_ref resObj (jni_env); |
869 jobject_ref java_idx (jni_env, make_java_index (jni_env, idx)); | 861 jobject_ref java_idx (jni_env, make_java_index (jni_env, idx)); |
870 | 862 |
871 if (! error_state) | 863 jclass_ref helperClass (jni_env, find_octave_class (jni_env, "org/octave/ClassHelper")); |
872 { | 864 jmethodID mID = jni_env->GetStaticMethodID (helperClass, "arraySubsref", "(Ljava/lang/Object;[[I)Ljava/lang/Object;"); |
873 jclass_ref helperClass (jni_env, find_octave_class (jni_env, "org/octave/ClassHelper")); | 865 resObj = jni_env->CallStaticObjectMethod (helperClass, mID, jobj, jobject (java_idx)); |
874 jmethodID mID = jni_env->GetStaticMethodID (helperClass, "arraySubsref", "(Ljava/lang/Object;[[I)Ljava/lang/Object;"); | |
875 resObj = jni_env->CallStaticObjectMethod (helperClass, mID, jobj, jobject (java_idx)); | |
876 } | |
877 | 866 |
878 if (resObj) | 867 if (resObj) |
879 retval = box (jni_env, resObj); | 868 retval = box (jni_env, resObj); |
880 else | 869 else |
881 retval = check_exception (jni_env); | 870 retval = check_exception (jni_env); |
894 jclass_ref rhsCls (jni_env); | 883 jclass_ref rhsCls (jni_env); |
895 jobject_ref resObj (jni_env); | 884 jobject_ref resObj (jni_env); |
896 jobject_ref rhsObj (jni_env); | 885 jobject_ref rhsObj (jni_env); |
897 jobject_ref java_idx (jni_env, make_java_index (jni_env, idx)); | 886 jobject_ref java_idx (jni_env, make_java_index (jni_env, idx)); |
898 | 887 |
899 if (! error_state && unbox (jni_env, rhs, rhsObj, rhsCls)) | 888 if (unbox (jni_env, rhs, rhsObj, rhsCls)) |
900 { | 889 { |
901 jclass_ref helperClass (jni_env, find_octave_class (jni_env, "org/octave/ClassHelper")); | 890 jclass_ref helperClass (jni_env, find_octave_class (jni_env, "org/octave/ClassHelper")); |
902 jmethodID mID = jni_env->GetStaticMethodID (helperClass, "arraySubsasgn", | 891 jmethodID mID = jni_env->GetStaticMethodID (helperClass, "arraySubsasgn", |
903 "(Ljava/lang/Object;[[ILjava/lang/Object;)Ljava/lang/Object;"); | 892 "(Ljava/lang/Object;[[ILjava/lang/Object;)Ljava/lang/Object;"); |
904 resObj = jni_env->CallStaticObjectMethod (helperClass, mID, | 893 resObj = jni_env->CallStaticObjectMethod (helperClass, mID, |
983 jstring_ref js (jni_env, reinterpret_cast<jstring> (jni_env->GetObjectArrayElement (array, i))); | 972 jstring_ref js (jni_env, reinterpret_cast<jstring> (jni_env->GetObjectArrayElement (array, i))); |
984 | 973 |
985 if (js) | 974 if (js) |
986 c(i) = octave_value (jstring_to_string (jni_env, js), type); | 975 c(i) = octave_value (jstring_to_string (jni_env, js), type); |
987 else | 976 else |
988 { | 977 c(i) = check_exception (jni_env); |
989 c(i) = check_exception (jni_env); | |
990 | |
991 if (error_state) | |
992 break; | |
993 } | |
994 } | 978 } |
995 | 979 |
996 retval = octave_value (c); | 980 retval = octave_value (c); |
997 } | 981 } |
998 else | 982 else |
1566 | 1550 |
1567 for (int i = 0; i < nargin; i++) | 1551 for (int i = 0; i < nargin; i++) |
1568 varargin(i) = box (env, env->GetObjectArrayElement (argin, i), 0); | 1552 varargin(i) = box (env, env->GetObjectArrayElement (argin, i), 0); |
1569 | 1553 |
1570 varargout = feval (fname, varargin, nargout); | 1554 varargout = feval (fname, varargin, nargout); |
1571 if (error_state) | |
1572 return false; | |
1573 | 1555 |
1574 jobjectArray_ref out_objs (env, argout), out_clss (env); | 1556 jobjectArray_ref out_objs (env, argout), out_clss (env); |
1575 out_objs.detach (); | 1557 out_objs.detach (); |
1576 return unbox (env, varargout, out_objs, out_clss); | 1558 return unbox (env, varargout, out_objs, out_clss); |
1577 } | 1559 } |
1596 | 1578 |
1597 for (int i = 0; i < len; i++) | 1579 for (int i = 0; i < len; i++) |
1598 { | 1580 { |
1599 jobject_ref jobj (env, env->GetObjectArrayElement (args, i)); | 1581 jobject_ref jobj (env, env->GetObjectArrayElement (args, i)); |
1600 oct_args(i) = box (env, jobj, 0); | 1582 oct_args(i) = box (env, jobj, 0); |
1601 | 1583 } |
1602 if (error_state) | 1584 |
1603 break; | 1585 BEGIN_INTERRUPT_WITH_EXCEPTIONS; |
1604 } | 1586 |
1605 | 1587 if (val.is_function_handle ()) |
1606 if (! error_state) | 1588 { |
1607 { | 1589 octave_function *fcn = val.function_value (); |
1608 BEGIN_INTERRUPT_WITH_EXCEPTIONS; | 1590 feval (fcn, oct_args); |
1609 | 1591 } |
1610 if (val.is_function_handle ()) | 1592 else if (val.is_cell () && val.length () > 0 |
1611 { | 1593 && (val.rows () == 1 || val.columns () == 1) |
1612 octave_function *fcn = val.function_value (); | 1594 && val.cell_value()(0).is_function_handle ()) |
1613 feval (fcn, oct_args); | 1595 { |
1614 } | 1596 Cell c = val.cell_value (); |
1615 else if (val.is_cell () && val.length () > 0 | 1597 octave_function *fcn = c(0).function_value (); |
1616 && (val.rows () == 1 || val.columns () == 1) | 1598 |
1617 && val.cell_value()(0).is_function_handle ()) | 1599 for (int i=1; i<c.numel (); i++) |
1618 { | 1600 oct_args(len+i-1) = c(i); |
1619 Cell c = val.cell_value (); | 1601 |
1620 octave_function *fcn = c(0).function_value (); | 1602 feval (fcn, oct_args); |
1621 | 1603 } |
1622 for (int i=1; i<c.numel (); i++) | 1604 else |
1623 oct_args(len+i-1) = c(i); | 1605 error ("trying to invoke non-invocable object"); |
1624 | 1606 |
1625 if (! error_state) | 1607 END_INTERRUPT_WITH_EXCEPTIONS; |
1626 feval (fcn, oct_args); | |
1627 } | |
1628 else | |
1629 error ("trying to invoke non-invocable object"); | |
1630 | |
1631 END_INTERRUPT_WITH_EXCEPTIONS; | |
1632 } | |
1633 } | 1608 } |
1634 } | 1609 } |
1635 | 1610 |
1636 JNIEXPORT void JNICALL | 1611 JNIEXPORT void JNICALL |
1637 Java_org_octave_Octave_doEvalString (JNIEnv *env, jclass, jstring cmd) | 1612 Java_org_octave_Octave_doEvalString (JNIEnv *env, jclass, jstring cmd) |
1751 count++; | 1726 count++; |
1752 ovl(0) = octave_value (this); | 1727 ovl(0) = octave_value (this); |
1753 ovl(1) = (idx.front ())(0); | 1728 ovl(1) = (idx.front ())(0); |
1754 ovl(2) = rhs; | 1729 ovl(2) = rhs; |
1755 feval ("__java_set__", ovl, 0); | 1730 feval ("__java_set__", ovl, 0); |
1756 if (! error_state) | 1731 |
1757 { | 1732 count++; |
1758 count++; | 1733 retval = octave_value (this); |
1759 retval = octave_value (this); | |
1760 } | |
1761 } | 1734 } |
1762 else if (type.length () > 2 && type[1] == '(') | 1735 else if (type.length () > 2 && type[1] == '(') |
1763 { | 1736 { |
1764 std::list<octave_value_list> new_idx; | 1737 std::list<octave_value_list> new_idx; |
1765 std::list<octave_value_list>::const_iterator it = idx.begin (); | 1738 std::list<octave_value_list>::const_iterator it = idx.begin (); |
1766 new_idx.push_back (*it++); | 1739 new_idx.push_back (*it++); |
1767 new_idx.push_back (*it++); | 1740 new_idx.push_back (*it++); |
1768 octave_value_list u = subsref (type.substr (0, 2), new_idx, 1); | 1741 octave_value_list u = subsref (type.substr (0, 2), new_idx, 1); |
1769 if (! error_state) | 1742 |
1770 { | 1743 std::list<octave_value_list> next_idx (idx); |
1771 std::list<octave_value_list> next_idx (idx); | 1744 next_idx.erase (next_idx.begin ()); |
1772 next_idx.erase (next_idx.begin ()); | 1745 next_idx.erase (next_idx.begin ()); |
1773 next_idx.erase (next_idx.begin ()); | 1746 u(0).subsasgn (type.substr (2), next_idx, rhs); |
1774 u(0).subsasgn (type.substr (2), next_idx, rhs); | 1747 |
1775 if (! error_state) | 1748 count++; |
1776 { | 1749 retval = octave_value (this); |
1777 count++; | |
1778 retval = octave_value (this); | |
1779 } | |
1780 } | |
1781 } | 1750 } |
1782 else if (type[1] == '.') | 1751 else if (type[1] == '.') |
1783 { | 1752 { |
1784 octave_value_list u = subsref (type.substr (0, 1), idx, 1); | 1753 octave_value_list u = subsref (type.substr (0, 1), idx, 1); |
1785 if (! error_state) | 1754 |
1786 { | 1755 std::list<octave_value_list> next_idx (idx); |
1787 std::list<octave_value_list> next_idx (idx); | 1756 next_idx.erase (next_idx.begin ()); |
1788 next_idx.erase (next_idx.begin ()); | 1757 u(0).subsasgn (type.substr (1), next_idx, rhs); |
1789 u(0).subsasgn (type.substr (1), next_idx, rhs); | 1758 |
1790 if (! error_state) | 1759 count++; |
1791 { | 1760 retval = octave_value (this); |
1792 count++; | |
1793 retval = octave_value (this); | |
1794 } | |
1795 } | |
1796 } | 1761 } |
1797 else | 1762 else |
1798 error ("invalid indexing/assignment on Java object"); | 1763 error ("invalid indexing/assignment on Java object"); |
1799 break; | 1764 break; |
1800 | 1765 |
1801 case '(': | 1766 case '(': |
1802 if (current_env) | 1767 if (current_env) |
1803 { | 1768 { |
1804 set_array_elements (current_env, to_java (), idx.front (), rhs); | 1769 set_array_elements (current_env, to_java (), idx.front (), rhs); |
1805 if (! error_state) | 1770 |
1806 { | 1771 count++; |
1807 count++; | 1772 retval = octave_value (this); |
1808 retval = octave_value (this); | |
1809 } | |
1810 } | 1773 } |
1811 break; | 1774 break; |
1812 | 1775 |
1813 default: | 1776 default: |
1814 error ("Java object cannot be indexed with %c", type[0]); | 1777 error ("Java object cannot be indexed with %c", type[0]); |
2120 | 2083 |
2121 retval = 0; | 2084 retval = 0; |
2122 | 2085 |
2123 initialize_java (); | 2086 initialize_java (); |
2124 | 2087 |
2125 if (! error_state) | 2088 retval = 1; |
2126 retval = 1; | |
2127 | 2089 |
2128 return retval; | 2090 return retval; |
2129 #else | 2091 #else |
2130 error ("__java_init__: Octave was not compiled with Java interface"); | 2092 error ("__java_init__: Octave was not compiled with Java interface"); |
2131 return octave_value (); | 2093 return octave_value (); |
2173 #ifdef HAVE_JAVA | 2135 #ifdef HAVE_JAVA |
2174 octave_value retval; | 2136 octave_value retval; |
2175 | 2137 |
2176 initialize_java (); | 2138 initialize_java (); |
2177 | 2139 |
2178 if (! error_state) | 2140 JNIEnv *current_env = octave_java::thread_jni_env (); |
2179 { | 2141 |
2180 JNIEnv *current_env = octave_java::thread_jni_env (); | 2142 if (args.length () > 0) |
2181 | 2143 { |
2182 if (args.length () > 0) | 2144 if (args(0).is_string ()) |
2183 { | 2145 { |
2184 if (args(0).is_string ()) | 2146 std::string classname = args(0).string_value (); |
2185 { | 2147 |
2186 std::string classname = args(0).string_value (); | 2148 octave_value_list tmp; |
2187 | 2149 for (int i=1; i<args.length (); i++) |
2188 octave_value_list tmp; | 2150 tmp(i-1) = args(i); |
2189 for (int i=1; i<args.length (); i++) | 2151 retval = octave_java::do_javaObject (current_env, classname, tmp); |
2190 tmp(i-1) = args(i); | |
2191 retval = octave_java::do_javaObject (current_env, classname, tmp); | |
2192 } | |
2193 else | |
2194 error ("javaObject: CLASSNAME must be a string"); | |
2195 } | 2152 } |
2196 else | 2153 else |
2197 print_usage (); | 2154 error ("javaObject: CLASSNAME must be a string"); |
2198 } | 2155 } |
2156 else | |
2157 print_usage (); | |
2199 | 2158 |
2200 return retval; | 2159 return retval; |
2201 #else | 2160 #else |
2202 error ("javaObject: Octave was not compiled with Java interface"); | 2161 error ("javaObject: Octave was not compiled with Java interface"); |
2203 return octave_value (); | 2162 return octave_value (); |
2241 #ifdef HAVE_JAVA | 2200 #ifdef HAVE_JAVA |
2242 octave_value retval; | 2201 octave_value retval; |
2243 | 2202 |
2244 initialize_java (); | 2203 initialize_java (); |
2245 | 2204 |
2246 if (! error_state) | 2205 JNIEnv *current_env = octave_java::thread_jni_env (); |
2247 { | 2206 |
2248 JNIEnv *current_env = octave_java::thread_jni_env (); | 2207 if (args.length () > 1) |
2249 | 2208 { |
2250 if (args.length () > 1) | 2209 if (args(0).is_string ()) |
2251 { | 2210 { |
2252 if (args(0).is_string ()) | 2211 std::string methodname = args(0).string_value (); |
2212 | |
2213 octave_value_list tmp; | |
2214 for (int i=2; i<args.length (); i++) | |
2215 tmp(i-2) = args(i); | |
2216 | |
2217 if (args(1).is_java ()) | |
2253 { | 2218 { |
2254 std::string methodname = args(0).string_value (); | 2219 octave_java *jobj = TO_JAVA (args(1)); |
2255 | 2220 retval = jobj->do_javaMethod (current_env, methodname, tmp); |
2256 octave_value_list tmp; | 2221 } |
2257 for (int i=2; i<args.length (); i++) | 2222 else if (args(1).is_string ()) |
2258 tmp(i-2) = args(i); | 2223 { |
2259 | 2224 std::string cls = args(1).string_value (); |
2260 if (args(1).is_java ()) | 2225 retval = octave_java::do_javaMethod (current_env, cls, methodname, tmp); |
2261 { | |
2262 octave_java *jobj = TO_JAVA (args(1)); | |
2263 retval = jobj->do_javaMethod (current_env, methodname, tmp); | |
2264 } | |
2265 else if (args(1).is_string ()) | |
2266 { | |
2267 std::string cls = args(1).string_value (); | |
2268 retval = octave_java::do_javaMethod (current_env, cls, methodname, tmp); | |
2269 } | |
2270 else | |
2271 error ("javaMethod: OBJ must be a Java object or a string"); | |
2272 } | 2226 } |
2273 else | 2227 else |
2274 error ("javaMethod: METHODNAME must be a string"); | 2228 error ("javaMethod: OBJ must be a Java object or a string"); |
2275 } | 2229 } |
2276 else | 2230 else |
2277 print_usage (); | 2231 error ("javaMethod: METHODNAME must be a string"); |
2278 } | 2232 } |
2233 else | |
2234 print_usage (); | |
2279 | 2235 |
2280 return retval; | 2236 return retval; |
2281 #else | 2237 #else |
2282 error ("javaMethod: Octave was not compiled with Java interface"); | 2238 error ("javaMethod: Octave was not compiled with Java interface"); |
2283 return octave_value (); | 2239 return octave_value (); |
2316 #ifdef HAVE_JAVA | 2272 #ifdef HAVE_JAVA |
2317 octave_value retval; | 2273 octave_value retval; |
2318 | 2274 |
2319 initialize_java (); | 2275 initialize_java (); |
2320 | 2276 |
2321 if (! error_state) | 2277 JNIEnv *current_env = octave_java::thread_jni_env (); |
2322 { | 2278 |
2323 JNIEnv *current_env = octave_java::thread_jni_env (); | 2279 if (args.length () == 2) |
2324 | 2280 { |
2325 if (args.length () == 2) | 2281 if (args(1).is_string ()) |
2326 { | 2282 { |
2327 if (args(1).is_string ()) | 2283 std::string name = args(1).string_value (); |
2284 | |
2285 if (args(0).is_java ()) | |
2328 { | 2286 { |
2329 std::string name = args(1).string_value (); | 2287 octave_java *jobj = TO_JAVA (args(0)); |
2330 | 2288 retval = jobj->do_java_get (current_env, name); |
2331 if (args(0).is_java ()) | 2289 } |
2332 { | 2290 else if (args(0).is_string ()) |
2333 octave_java *jobj = TO_JAVA (args(0)); | 2291 { |
2334 retval = jobj->do_java_get (current_env, name); | 2292 std::string cls = args(0).string_value (); |
2335 } | 2293 retval = octave_java::do_java_get (current_env, cls, name); |
2336 else if (args(0).is_string ()) | |
2337 { | |
2338 std::string cls = args(0).string_value (); | |
2339 retval = octave_java::do_java_get (current_env, cls, name); | |
2340 } | |
2341 else | |
2342 error ("__java_get__: OBJ must be a Java object or a string"); | |
2343 } | 2294 } |
2344 else | 2295 else |
2345 error ("__java_get__: NAME must be a string"); | 2296 error ("__java_get__: OBJ must be a Java object or a string"); |
2346 } | 2297 } |
2347 else | 2298 else |
2348 print_usage (); | 2299 error ("__java_get__: NAME must be a string"); |
2349 } | 2300 } |
2301 else | |
2302 print_usage (); | |
2350 | 2303 |
2351 return retval; | 2304 return retval; |
2352 #else | 2305 #else |
2353 error ("__java_get__: Octave was not compiled with Java interface"); | 2306 error ("__java_get__: Octave was not compiled with Java interface"); |
2354 return octave_value (); | 2307 return octave_value (); |
2381 #ifdef HAVE_JAVA | 2334 #ifdef HAVE_JAVA |
2382 octave_value retval; | 2335 octave_value retval; |
2383 | 2336 |
2384 initialize_java (); | 2337 initialize_java (); |
2385 | 2338 |
2386 if (! error_state) | 2339 JNIEnv *current_env = octave_java::thread_jni_env (); |
2387 { | 2340 |
2388 JNIEnv *current_env = octave_java::thread_jni_env (); | 2341 if (args.length () == 3) |
2389 | 2342 { |
2390 if (args.length () == 3) | 2343 if (args(1).is_string ()) |
2391 { | 2344 { |
2392 if (args(1).is_string ()) | 2345 std::string name = args(1).string_value (); |
2346 | |
2347 if (args(0).is_java ()) | |
2393 { | 2348 { |
2394 std::string name = args(1).string_value (); | 2349 octave_java *jobj = TO_JAVA (args(0)); |
2395 | 2350 retval = jobj->do_java_set (current_env, name, args(2)); |
2396 if (args(0).is_java ()) | 2351 } |
2397 { | 2352 else if (args(0).is_string ()) |
2398 octave_java *jobj = TO_JAVA (args(0)); | 2353 { |
2399 retval = jobj->do_java_set (current_env, name, args(2)); | 2354 std::string cls = args(0).string_value (); |
2400 } | 2355 retval = octave_java::do_java_set (current_env, cls, name, args(2)); |
2401 else if (args(0).is_string ()) | |
2402 { | |
2403 std::string cls = args(0).string_value (); | |
2404 retval = octave_java::do_java_set (current_env, cls, name, args(2)); | |
2405 } | |
2406 else | |
2407 error ("__java_set__: OBJ must be a Java object or a string"); | |
2408 } | 2356 } |
2409 else | 2357 else |
2410 error ("__java_set__: NAME must be a string"); | 2358 error ("__java_set__: OBJ must be a Java object or a string"); |
2411 } | 2359 } |
2412 else | 2360 else |
2413 print_usage (); | 2361 error ("__java_set__: NAME must be a string"); |
2414 } | 2362 } |
2363 else | |
2364 print_usage (); | |
2415 | 2365 |
2416 return retval; | 2366 return retval; |
2417 #else | 2367 #else |
2418 error ("__java_set__: Octave was not compiled with Java interface"); | 2368 error ("__java_set__: Octave was not compiled with Java interface"); |
2419 return octave_value (); | 2369 return octave_value (); |
2429 #ifdef HAVE_JAVA | 2379 #ifdef HAVE_JAVA |
2430 octave_value_list retval; | 2380 octave_value_list retval; |
2431 | 2381 |
2432 initialize_java (); | 2382 initialize_java (); |
2433 | 2383 |
2434 if (! error_state) | 2384 JNIEnv *current_env = octave_java::thread_jni_env (); |
2435 { | 2385 |
2436 JNIEnv *current_env = octave_java::thread_jni_env (); | 2386 if (args.length () == 1) |
2437 | 2387 { |
2438 if (args.length () == 1) | 2388 if (args(0).is_java ()) |
2439 { | 2389 { |
2440 if (args(0).is_java ()) | 2390 octave_java *jobj = TO_JAVA (args(0)); |
2441 { | 2391 retval(0) = box_more (current_env, jobj->to_java (), 0); |
2442 octave_java *jobj = TO_JAVA (args(0)); | |
2443 retval(0) = box_more (current_env, jobj->to_java (), 0); | |
2444 } | |
2445 else | |
2446 retval(0) = args(0); | |
2447 } | 2392 } |
2448 else | 2393 else |
2449 print_usage (); | 2394 retval(0) = args(0); |
2450 } | 2395 } |
2396 else | |
2397 print_usage (); | |
2451 | 2398 |
2452 return retval; | 2399 return retval; |
2453 #else | 2400 #else |
2454 error ("java2mat: Octave was not compiled with Java interface"); | 2401 error ("java2mat: Octave was not compiled with Java interface"); |
2455 return octave_value (); | 2402 return octave_value (); |