public override AType ExecutePrimitive(AFloat argument, Aplus environment = null) { int result; if(argument.ConvertToRestrictedWholeNumber(out result)) { return calculateNot(result); } throw new Error.Type(TypeErrorText); }
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); }
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); }