コード例 #1
0
        public override AType ExecutePrimitive(AFloat argument, Aplus environment = null)
        {
            int result;

            if (argument.ConvertToRestrictedWholeNumber(out result))
            {
                return(calculateNot(result));
            }
            throw new Error.Type(TypeErrorText);
        }
コード例 #2
0
        public override AType ExecutePrimitive(AFloat argument, Aplus environment = null)
        {
            int number;

            if (!argument.ConvertToRestrictedWholeNumber(out number))
            {
                throw new Error.Type("Bitwise not");
            }

            return(AInteger.Create(~number));
        }
コード例 #3
0
        public override AType ExecutePrimitive(AFloat argument, Aplus environment)
        {
            int seed = GetSeed(environment);
            int result;

            if (!argument.ConvertToRestrictedWholeNumber(out result))
            {
                throw new Error.Type(TypeErrorText);
            }

            return(generateRandomNumber(seed, result));
        }