JAVA::java::lang::Math perform:#'abs(I)I' with:-1234
JAVA::java::lang::Math perform:#'abs(F)F' with:-1234.0
Use #perform: passing a smalltalk-like selector, to let ST/X choose the best
matching java function:
JAVA::java::lang::Math perform:#'abs' with:-1234
JAVA::java::lang::Math perform:#'abs' with:-1234.0
The later are equivalent to:
JAVA::java::lang::Math abs:-1234
JAVA::java::lang::Math abs:-1234.0
Be aware, that this automatic choice may not lead to a definite function being
invoked; for example, Math provides both float- and double-argument versions
of the abs function. Or there might be versions for both the integer and the
Number type.
Some erronous examples:
leads to an argument count mismatch error.
JAVA::ArcTest main
Some good examples:
JAVA::ArcTest main:#()
JAVA::ArcTest main:#('hello' 'world')
Copyright © 1998 Claus Gittinger Development & Consulting, all rights reserved
<cg@exept.de>