On 5/27/06, John Meyer <[EMAIL PROTECTED]> wrote:
if i_Error <> 0 then
         begin
         d_SalesTax := 0;
         end;

Remove the semicolon after the above "end".

      else  <---line that is giving me the error
          if d_SalesTax > 0 then
          begin
             d_SalesTax := d_SalesTax / 100

          end;


Complete example below...  I added another begin..end in the else part
to stop confusion with what should execute, and remove the begin..end
from the second if statement.  If there is only one line of code after
a If statement, I normally don't wrap it in begin..end. Personal taste
and easier to read.  I do add them though for if..then..else
statements.

if i_Error <> 0 then
begin
 d_SalesTax := 0;
end
else
begin
 if d_SalesTax > 0 then
   d_SalesTax := d_SalesTax / 100;
end;  { if..else }


Regards,
 Graeme.


--
There's no place like 127.0.0.1

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to