title: Incorrect syntax near the keyword 'SET' and also giving me some warnings
body: <p>Can anyone please help me out with the warnings in the below query</p>
  
  <pre><code>CREATE FUNCTION MyRound(@Operand Float,@Places INT) 
  RETURNS Float
  AS
  BEGIN
      DECLARE @x Float;
      DECLARE @i INT;
      DECLARE @ix Float;
  
        SET @x = @Operand*Power(10,@Places);
        SET @i=@x;
  
        IF ((@i-@x) &gt;= 0.5) 
        Begin                   
          SET @ix = 1;   
          End               
        ELSE
        Begin
          SET @ix = 0;  
          End               
        END ;     
  
        SET @x=@i+@ix;
        SET @x=@x/Power(10,@Places);
  
      RETURN @x;
  END
  </code></pre>
  
  <p>I am getting 3 different warnings </p>
  
  <ol>
  <li>Create Function must be the only statement in the batch </li>
  <li>Must Declare Scalar Variable</li>
  <li>Incorrect syntax near End of File. Expecting CONVERSATION.</li>
  </ol>