[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62406] Common java classes (String, Number) d
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #62406] Common java classes (String, Number) do not have overloaded display routines as in Matlab |
Date: |
Wed, 4 May 2022 13:25:33 -0400 (EDT) |
Update of bug #62406 (project octave):
Status: None => Confirmed
Release: 7.1.0 => dev
Summary: javaObject() java.lang.String Has Different Output
with MATLAB => Common java classes (String, Number) do not have overloaded
display routines as in Matlab
_______________________________________________________
Follow-up Comment #7:
The javaObject command is generic in the sense that it can create any object
from any class in Java, and there are thousands of possible classes. Hence,
Octave applies a generic display strategy reporting what the variable is "Java
object" and what class it is an instance of "java.lang.String".
Matlab does the same thing, in general. For example, try
obj = javaObject ('java.lang.Object')
which creates a very, very basic Java object. All Matlab reports is
obj =
java.lang.Object
Because java.lang.String is so common, and interconvertible with character
arrays or strings in Matlab, they seem to have written a specific display
routine for it.
Octave could do the same thing. I'm not sure where, exactly, this would live.
Maybe in unboxing routines in ov-java.cc, or maybe in the display code.
Another strategy might be to call __java2mat__ and if that is successful then
print the resulting octave_value using Octave's normal display routines.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62406>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62406] javaObject() java.lang.String Has Different Output with MATLAB, Glite, 2022/05/03
- [Octave-bug-tracker] [bug #62406] javaObject() java.lang.String Has Different Output with MATLAB, Nicholas Jankowski, 2022/05/03
- [Octave-bug-tracker] [bug #62406] javaObject() java.lang.String Has Different Output with MATLAB, Glite, 2022/05/03
- [Octave-bug-tracker] [bug #62406] javaObject() java.lang.String Has Different Output with MATLAB, Nicholas Jankowski, 2022/05/03
- [Octave-bug-tracker] [bug #62406] javaObject() java.lang.String Has Different Output with MATLAB, Glite, 2022/05/03
- [Octave-bug-tracker] [bug #62406] javaObject() java.lang.String Has Different Output with MATLAB, Glite, 2022/05/03
- [Octave-bug-tracker] [bug #62406] javaObject() java.lang.String Has Different Output with MATLAB, Philip Nienhuis, 2022/05/04
- [Octave-bug-tracker] [bug #62406] Common java classes (String, Number) do not have overloaded display routines as in Matlab,
Rik <=
- [Octave-bug-tracker] [bug #62406] Common java classes (String, Number) do not have overloaded display routines as in Matlab, Rik, 2022/05/04
- [Octave-bug-tracker] [bug #62406] Common java classes (String, Number) do not have overloaded display routines as in Matlab, Glite, 2022/05/04
- [Octave-bug-tracker] [bug #62406] Common java classes (String, Number) do not have overloaded display routines as in Matlab, Glite, 2022/05/04