mirror of
https://github.com/zeroflag/fcl.git
synced 2024-11-16 07:47:45 +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() {
|
||||||
throw new TypeMismatched(this, "bool");
|
if (STRICT)
|
||||||
|
throw new TypeMismatched(this, "bool");
|
||||||
|
else
|
||||||
|
return value.longValue() != 0l;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -15,4 +15,5 @@
|
||||||
|
|
||||||
: 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