<<

Contents

Search

>>

 

#JAVA

 

 

Compiler Instruction

 

 

Syntax:

#JAVA
... Java code ...
#ENDJAVA

 

Meaning:

With this compiler instruction any java sourcecode can be inserted.

 

Auxiliary variables can be used in java sourcecode. They are marked by the pre-positioned character “$”. With dimensionised variables square brackets [ ]are to be used for indices. It is not checked whether the number of dimensions matches the definition of the auxiliary variables.  

 

Sample:

DIM RGB%(3)

TITLE$ = "Color Dialog"

 

#JAVA

Color newColor = JColorChooser.showDialog(ebus.mainframe,$TITLE$,new Color(255,192,64));

if (newColor != null)

   { $ROT% = newColor.getRed();

     $GRUEN% = newColor.getGreen();

     $BLAU% = newColor.getBlue();

     $RGB%[1] = $ROT%

     $RGB%[2] = $GRUEN%

     $RGB%[3] = $BLAU%

   }

#ENDJAVA

 

ERRORMES = STR$(ROT%) + STR$(GRUEN%) + STR$(BLAU%)

 

See also:

#JAVA_LOCAL

#JAVA_GLOBAL

#JAVA_IMPORT