Jump to content
Registration disabled at the moment Read more... ×
Freeeee

what wrong with this function?

Recommended Posts

To be a bit more direct - the unit below produces a bunch of errors for function two's definition but its definition is fine when used elsewhere. Can you spot what is wrong? Look hard.

unit UnitTest;

interface
  function One : integer;
  function two : integer;

implementation
  function one : integer;
  begin
    one := 1;
// end;

  function two : integer;
  begin
    two := 2;
  end;

end.

 

 

Share this post


Link to post

TOO ALL who answered.

Remy is absolutely correct.  I was trying something stupid  and it didn't work.

I thought if I could figure out why the IDE/Compiler got stuck there I might be able figure out how to fix it.

 

And the problem was in the dot pfm file.  which are part of the 451 lines above the problem.

Thanks for pointing me to those URLz , Remy.    They did help.

Thanks everyone.  I'll refrain from stupid questions... well.... I'll Try to refrain from stupid questions in

the future.   

 

I've noticed that the Format the code option gives you a kind of Ominous warning.

 

When some one asks you "do you 'Really' want to do this?" it made me think.."hmmm .... maybe not.'

 

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×