Board index » delphi » how to compile own tp7-unit

how to compile own tp7-unit

In article <8v6kis$slh$0...@news.t-online.com>,

Quote
Dr.B.Kloppt <dr.b.klo...@gmx.net> wrote:
>hiho all together!

>does anyone know, how i can compile my own-written units?!
>by the way: is this code (for example) correct as a unit:
>---

First: please use blank lines, indentation etc. What you wrote is just
awful.

Quote
>unit djk;
>interface
>procedure beep;

You need to specify the parameters in the interface. You may (and IMO
should) put them also in the implementation part but that is not
absolutely necessary (if is like with forward)

Quote
>implementation
>uses crt;
>procedure beep(hz,del:integer);
>begin
>sound(hz);
>delay(del);
>nosound;
>end;

You need to add:

end.

to end the unit. If you use initialization block, then you need also
begin.

Osmo

 

Re:how to compile own tp7-unit


Quote
"Dr.B.Kloppt" wrote:

> Date: Sun, 19 Nov 2000 20:14:59 +0100

Can you predict what is going to happen tomorrow or is only your system
time 24h ahead?

Quote
> hiho all together!

> does anyone know, how i can compile my own-written units?!
> by the way: is this code (for example) correct as a unit:
> ---
> unit djk;
> interface
> procedure beep;
> implementation
> uses crt;
> procedure beep(hz,del:integer);
> begin
> sound(hz);
> delay(del);
> nosound;
> end;
> ---

"end." is missing here.

Please reformat your source so that is more readable:

unit djk;

interface

procedure beep;

implementation

uses
  crt;

procedure beep(hz,del:integer);
begin
  sound(hz);
  delay(del);
  nosound;
end;

end.

Quote
> CU DJK
> ps: sorry for my bad english, im german!

You can ask in DE.comp.lang.pascal where the language is german.

Wolf

Re:how to compile own tp7-unit


Quote
Wolf Behrenhoff wrote:

> unit djk;

> interface

> procedure beep;

uups, arguments are missing here.

Re:how to compile own tp7-unit


hiho all together!

does anyone know, how i can compile my own-written units?!
by the way: is this code (for example) correct as a unit:
---
unit djk;
interface
procedure beep;
implementation
uses crt;
procedure beep(hz,del:integer);
begin
sound(hz);
delay(del);
nosound;
end;
---

CU DJK
ps: sorry for my bad english, im german!

Re:how to compile own tp7-unit


1- I think you shall put (hz,del:integer) on interface beep declaration
also.
2- Last line missing : end.
Ricardo Dunna
Quote
"Dr.B.Kloppt" wrote:

> hiho all together!

> does anyone know, how i can compile my own-written units?!
> by the way: is this code (for example) correct as a unit:
> ---
> unit djk;
> interface
> procedure beep;
> implementation
> uses crt;
> procedure beep(hz,del:integer);
> begin
> sound(hz);
> delay(del);
> nosound;
> end;
> ---

> CU DJK
> ps: sorry for my bad english, im german!

Other Threads