I have managed to make it work.
if the lines are
compile('java-end',java)
@java-code 'System.out.println("q1eqwqweq");'
java-end
then it will not build but if either are:
compile('java-end',java)
@java-code 'System.out.println("q1eqwqweq");' !NOTE the space at begining of line
java-end
or all three lines start from column 2 as
compile('java-end',java)
@java-code 'System.out.println("q1eqwqweq");'
java-end
then it is ok
I think this could be treated as bug. Anyway i can now use @java-code
Nenad
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@java-code is treated like any other clarion statement. It must be indented. Otherwise it is considered to be a label.
(This is one of my few bug bears with clarion syntax. Whitespace conveys lexical meaning. Most mainstream languages do not do this. A notable exception being Python).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
i can not understand how to use @java-code directive
my code is as follows:
MEMBER('wmj.clw') ! This is a MEMBER module
MAP
INCLUDE('WMJ003.INC'),ONCE !Local module procedure declarations
END
QiqoMjenjaci PROCEDURE ! Declare Procedure
qqq string(5)
CODE
compile('java-end',java)
@java-code 'System.out.println("q1eqwqweq");' ()
java-end
and when i build with mvn i get "clarionCompilError> Expected eof near line 14 …" which is the @java-code line
I have tried various variations of that line but can not make it to work.
thanks
Nenad
I have managed to make it work.
if the lines are
compile('java-end',java)
@java-code 'System.out.println("q1eqwqweq");'
java-end
then it will not build but if either are:
compile('java-end',java)
@java-code 'System.out.println("q1eqwqweq");' !NOTE the space at begining of line
java-end
or all three lines start from column 2 as
compile('java-end',java)
@java-code 'System.out.println("q1eqwqweq");'
java-end
then it is ok
I think this could be treated as bug. Anyway i can now use @java-code
Nenad
@java-code is treated like any other clarion statement. It must be indented. Otherwise it is considered to be a label.
(This is one of my few bug bears with clarion syntax. Whitespace conveys lexical meaning. Most mainstream languages do not do this. A notable exception being Python).