Exemple #1
0
        // (n1 n2 -- d)
        private int MStarAction()
        {
            _interpreter.StackExpect(2);

            _interpreter.DPush((long)_interpreter.Pop() * (long)_interpreter.Pop());

            return(1);
        }
Exemple #2
0
        // ( -- d) (F: f -- )
        private int FToDAction()
        {
            _interpreter.FStackExpect(1);
            _interpreter.StackFree(2);

            _interpreter.DPush((long)_interpreter.FPop());

            return(1);
        }
Exemple #3
0
        // Extra

        // ( -- false | d true) {s -- }
        private int ToNumberAction()
        {
            _interpreter.ObjectStackExpect(1);

            var n = _interpreter.ParseIntegerNumber(_interpreter.OPop().ToString(), out var success);

            if (success)
            {
                _interpreter.StackFree(3);

                _interpreter.DPush(n);
                _interpreter.Push(-1);
            }
            else
            {
                _interpreter.StackFree(1);

                _interpreter.Push(0);
            }

            return(1);
        }