Error "Unsupported float or long operation"
Greetings.
I will explain you my problem with the attached source.
The source compile correctly, but Javelin show me the error "Unsupported float or long operation" when I click on Debug and It happends although the source have a few lines in its main class (it's the example that I give you). This happends if I have the wire connect to the robot, or if it isn´t connect, or if I remove the .class and I generate it again...
I've been doing more things but I didn´t work and I can´t find the solution anywhere.
Waiting some help.
Thanks so much.
I will explain you my problem with the attached source.
The source compile correctly, but Javelin show me the error "Unsupported float or long operation" when I click on Debug and It happends although the source have a few lines in its main class (it's the example that I give you). This happends if I have the wire connect to the robot, or if it isn´t connect, or if I remove the .class and I generate it again...
I've been doing more things but I didn´t work and I can´t find the solution anywhere.
Waiting some help.
Thanks so much.
Comments
change
······· // Método que devuelve las coordenadas del conjunto difuso
······· public double getCoordenadas(int conjuntoDifuso, int coordenada) {
··············· return (this.coordenadas[noparse][[/noparse]conjuntoDifuso][noparse][[/noparse]coordenada]);
······· }
into
······· // Método que devuelve las coordenadas del conjunto difuso
······· public int getCoordenadas(int conjuntoDifuso, int coordenada) {
··············· return (this.coordenadas[noparse][[/noparse]conjuntoDifuso][noparse][[/noparse]coordenada]);
······· }
Although double and float are reserved words, you cannot specify them
as floating point is not natively implemented. There is a package
Float32 in case you really need floating point math.
regards peter
When I comment the lines (1) and (2) there're no problem, but with those 2 lines the error appears
I only use the type int in the constructor "Tablas". Nothing of bytes.
Thanks. Greetings.
Post Edited (Ajenjo) : 5/11/2007 9:42:06 AM GMT
You can however create something simular like this:
private class arrY {
· public int[noparse]/noparse Array = new int[noparse][[/noparse]256]; //y dimensions
· public arrY() {
· }
}
private arrY[noparse]/noparse myArray = new arrY[noparse][[/noparse]32]; //x dimensions
You can then access myArray[noparse][[/noparse]x][noparse][[/noparse]y] as
myArray[noparse][[/noparse]x].Array[noparse][[/noparse]y]
regards peter