// (addr -- ) (F: -- f) private int DFFetchAction() { _interpreter.StackExpect(1); _interpreter.FStackFree(1); var addr = _interpreter.Pop(); _interpreter.CheckCellAlignedAddress(addr); _interpreter.CheckAddressesRange(addr, Heap.DoubleCellSize); _interpreter.FPush(_interpreter.State.Heap.ReadDouble(addr)); return(1); }
// ( -- false | true) (F: | f -- ) {s -- } private int ToNumberAction() { _interpreter.ObjectStackExpect(1); var f = _interpreter.ParseFloatingPointNumber(_interpreter.OPop().ToString(), out var success); if (success) { _interpreter.StackFree(1); _interpreter.FStackFree(1); _interpreter.FPush(f); _interpreter.Push(-1); } else { _interpreter.StackFree(1); _interpreter.Push(0); } return(1); }