MATLAB BUILDER JA 2 Betriebsanweisung Seite 103

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 292
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 102
Guidelines for Working with MWArray Classes
Constructing an MWCharArray
The MWCharArray class provides a set of constructors and factory methods for
creating logical arrays. The following tableliststhesuppliedconstructors.
Constructor Usage
MWCharArray()
Empty char array
MWCharArray(type)
char
array with values initialized with supplied
data
Here, type represents supported Java types. MWCharArray supports the
following Java types:
char, java.lang.Character,andjava.lang.String.
In addition to supporting scalar values of the types listed, g eneral
N-dimensional arrays of each type are also supported. The following examples
create scalar
char arrays:
MWCharArray a1 = new MWCharArray('a');
MWCharArray a2 = new MWCharArray(new Character('a'));
Constructing Strings. Yo u can use the MWCharArray class to create character
strings,asshownintheseexamples:
char[] x1 = {'A', ' ', 'S', 't', 'r', 'i', 'n', 'g'};
String x2 = "A String";
Character[] x3 = {
new Character('A'),
new Character(' '),
new Character('S'),
new Character('t'),
new Character('r'),
new Character('i'),
new Character('n'),
new Character('g')};
MWCharArray a1 = new MWCharArray(x1);
MWCharArray a2 = new MWCharArray(x2);
MWCharArray a3 = new MWCharArray(x3);
4-27
Seitenansicht 102
1 2 ... 98 99 100 101 102 103 104 105 106 107 108 ... 291 292

Kommentare zu diesen Handbüchern

Keine Kommentare