Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Delphi abnormal

KoppisKoppis Posts: 68Member
If anyone knows a good reason for this, I would like to know it:
This works[code]
PROCEDURE DummyMe;
CONST IamZero = 0;
BEGIN

END;
[/code]

This does not[code]
PROCEDURE DummyMe;
CONST IamZero = 0; [red]//[/red]
BEGIN

END;[/code]

It says "BEGIN expected but END found" on line " CONST IamZero = 0;"
It says also "Declaration expected but end of file found" on the empty line.
Delphi hates my comments?
Using Delphi 3.0

Comments

  • zibadianzibadian Posts: 6,349Member
    : If anyone knows a good reason for this, I would like to know it:
    : This works[code]
    : PROCEDURE DummyMe;
    : CONST IamZero = 0;
    : BEGIN
    :
    : END;
    : [/code]
    :
    : This does not[code]
    : PROCEDURE DummyMe;
    : CONST IamZero = 0; [red]//[/red]
    : BEGIN
    :
    : END;[/code]
    :
    : It says "BEGIN expected but END found" on line " CONST IamZero = 0;"
    : It says also "Declaration expected but end of file found" on the empty line.
    : Delphi hates my comments?
    : Using Delphi 3.0
    :
    I think prior to Delphi 4, the only recognized comment symbols are {}, just like the old TP, although I'm not sure. If it is, then // is being compiled like a division statement.
  • GaashiusGaashius Posts: 349Member
    : : If anyone knows a good reason for this, I would like to know it:
    : : This works[code]
    : : PROCEDURE DummyMe;
    : : CONST IamZero = 0;
    : : BEGIN
    : :
    : : END;
    : : [/code]
    : :
    : : This does not[code]
    : : PROCEDURE DummyMe;
    : : CONST IamZero = 0; [red]//[/red]
    : : BEGIN
    : :
    : : END;[/code]
    : :
    : : It says "BEGIN expected but END found" on line " CONST IamZero = 0;"
    : : It says also "Declaration expected but end of file found" on the empty line.
    : : Delphi hates my comments?
    : : Using Delphi 3.0
    : :
    : I think prior to Delphi 4, the only recognized comment symbols are {}, just like the old TP, although I'm not sure. If it is, then // is being compiled like a division statement.
    :
    I also encountered similar problems... check if the line is ending with #13#10 instead of #13.

    ****************
    Any questions? Just ask!

    :-) [b][blue]GAASHIUS[/blue][/b] :-)


  • KoppisKoppis Posts: 68Member
    : : : If anyone knows a good reason for this, I would like to know it:
    : : : This works[code]
    : : : PROCEDURE DummyMe;
    : : : CONST IamZero = 0;
    : : : BEGIN
    : : :
    : : : END;
    : : : [/code]
    : : :
    : : : This does not[code]
    : : : PROCEDURE DummyMe;
    : : : CONST IamZero = 0; [red]//[/red]
    : : : BEGIN
    : : :
    : : : END;[/code]
    : : :
    : : : It says "BEGIN expected but END found" on line " CONST IamZero = 0;"
    : : : It says also "Declaration expected but end of file found" on the empty line.
    : : : Delphi hates my comments?
    : : : Using Delphi 3.0
    : : :
    : : I think prior to Delphi 4, the only recognized comment symbols are {}, just like the old TP, although I'm not sure. If it is, then // is being compiled like a division statement.
    : :
    : I also encountered similar problems... check if the line is ending with #13#10 instead of #13.
    :
    : ****************
    : Any questions? Just ask!
    :
    : :-) [b][blue]GAASHIUS[/blue][/b] :-)
    :
    :
    :

    I am unable to receive this error any more. Delphi lost its toolbar icons (they changed to mono-colored black icons ==> Corruption??) and then it gave me VCL30.DPL Access error, which is nice/weird. I restarted PC, went outside, come back and now it works.
Sign In or Register to comment.