// (f-addr -- ) (F: f -- ) private int FStoreAction() { _interpreter.StackExpect(1); _interpreter.FStackExpect(1); var addr = _interpreter.Pop(); _interpreter.CheckCellAlignedAddress(addr); _interpreter.CheckAddressesRange(addr, Heap.DoubleCellSize); _interpreter.State.Heap.Write(addr, _interpreter.FPop()); return(1); }
// (n -- ) or (F: f -- ) private int ToAction() { _interpreter.StackExpect(1); var valueWord = _interpreter.GetWord(_interpreter.ParseWord()); if (valueWord is SingleCellValueWord) { ((SingleCellValueWord)valueWord).Value = _interpreter.Pop(); return(1); } else if (valueWord is FloatingPointValueWord) { ((FloatingPointValueWord)valueWord).Value = _interpreter.FPop(); return(1); } throw new Exception("A VALUE or FVALUE created word expected."); }