I want to report a problem that I have fought for the last day or so.
WORDByReference TFS=new WORDByReference();
TFS.setValue(new WORD (10000));
System.out.println( "TFS="+ TFS.getPointer().getShort(0));//works shows a value of 10000
System.out.println( "TFS="+ TFS.getValue());//gives error
The line using TFS.getValue() causes an Memory.boundsCheck error at run time.
The line using TFS.getPointer().getShort(0) works.
The code for getValue in the WORDByReference Class is
public WORD getValue() {
return new WORD(getPointer().getInt(0));
}
shouldn't it be
public WORD getValue() {
return new WORD(getPointer().getShort(0));
}
I am no Java expert, but makes sense to me.
Thank you, Kent
I want to report a problem that I have fought for the last day or so.
WORDByReference TFS=new WORDByReference();
TFS.setValue(new WORD (10000));
System.out.println( "TFS="+ TFS.getPointer().getShort(0));//works shows a value of 10000
System.out.println( "TFS="+ TFS.getValue());//gives error
The line using TFS.getValue() causes an Memory.boundsCheck error at run time.
The line using TFS.getPointer().getShort(0) works.
The code for getValue in the WORDByReference Class is
public WORD getValue() {
return new WORD(getPointer().getInt(0));
}
shouldn't it be
public WORD getValue() {
return new WORD(getPointer().getShort(0));
}
I am no Java expert, but makes sense to me.
Thank you, Kent