mirror of
https://github.com/zeroflag/fcl.git
synced 2024-11-17 07:48:51 +01:00
torch
This commit is contained in:
parent
59ccc85f92
commit
c188719c08
2 changed files with 6 additions and 2 deletions
|
@ -228,7 +228,10 @@ public class Num implements Obj, LogicOperand, ArithmeticOperand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean boolValue() {
|
public boolean boolValue() {
|
||||||
|
if (STRICT)
|
||||||
throw new TypeMismatched(this, "bool");
|
throw new TypeMismatched(this, "bool");
|
||||||
|
else
|
||||||
|
return value.longValue() != 0l;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,3 +16,4 @@
|
||||||
: ms ( n -- ) 'java.lang.Thread/sleep/l' jvm-call-static ;
|
: ms ( n -- ) 'java.lang.Thread/sleep/l' jvm-call-static ;
|
||||||
|
|
||||||
: tone ( hz ms -- ) swap 'com.vectron.forthcalc.support.Tone/play/di' jvm-call-static ;
|
: tone ( hz ms -- ) swap 'com.vectron.forthcalc.support.Tone/play/di' jvm-call-static ;
|
||||||
|
: torch ( n -- ) 'com.vectron.forthcalc.support.Torch/toggle/O' jvm-call-static ;
|
Loading…
Reference in a new issue