Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6127769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:32:59+00:00 2026-05-23T16:32:59+00:00

I have a unit called RCLowPass which uses Unit2. It uses the object TForm2.

  • 0

I have a unit called RCLowPass which uses Unit2. It uses the object TForm2.

Unit2 also uses RCLowPass.

Delphi complains about a circular reference because one module requires the other.

Below are relevant samples of the units in question.

RCLowPass:

unit RCLowPass;

interface

uses
  ComplexMath, ExtraMath, Unit2;

procedure SelectRCLowPassFilter;

implementation

{ This is why I need Unit2. }
procedure SelectRCLowPassFilter;
begin
  // Setup form for RC Low Pass
  TForm2.Prop1Name.Caption := 'R1';
  TForm2.Prop1Name.Visible := true;
  TForm2.Prop2Name.Caption := 'C1';
  TForm2.Prop2Name.Visible := true;
  TForm2.Prop3Name.Visible := false;
  TForm2.Prop4Name.Visible := false;
  TForm2.Prop5Name.Visible := false;
  TForm2.Prop6Name.Visible := false;
  TForm2.Prop7Name.Visible := false;
  TForm2.Prop8Name.Visible := false;
  TForm2.Prop1Value.Visible := true;
  TForm2.Prop2Value.Visible := true;
  TForm2.Prop3Value.Visible := false;
  TForm2.Prop4Value.Visible := false;
  TForm2.Prop5Value.Visible := false;
  TForm2.Prop6Value.Visible := false;
  TForm2.Prop7Value.Visible := false;
  TForm2.Prop8Value.Visible := false;
end;

end.

Unit2:

unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, RCLowPass, ExtCtrls;

var
  Form2: TForm2;

implementation

uses RCLowPass;

{$R *.dfm}

{ This is why I need RCLowPass. }
procedure TForm2.Button1Click(Sender: TObject);
var
  v : real;
begin
  ShowMessage('Output of RC lowpass with R=1k, C=100n');
  v := RCLowPassZAtFreq(1000, 100e-9, 10);
  ShowMessage('@10Hz: ' + FormatFloat('#.########', v));
  v := RCLowPassZAtFreq(1000, 100e-9, 10);
  ShowMessage('@20Hz: ' + FormatFloat('#.########', v));
  v := RCLowPassZAtFreq(1000, 100e-9, 20);
  ShowMessage('@50Hz: ' + FormatFloat('#.########', v));
  v := RCLowPassZAtFreq(1000, 100e-9, 50);
  ShowMessage('@100Hz: ' + FormatFloat('#.########', v));
  v := RCLowPassZAtFreq(1000, 100e-9, 100);
  ShowMessage('@200Hz: ' + FormatFloat('#.########', v));
  v := RCLowPassZAtFreq(1000, 100e-9, 200);
  ShowMessage('@500Hz: ' + FormatFloat('#.########', v));
  v := RCLowPassZAtFreq(1000, 100e-9, 500);
  ShowMessage('@1000Hz: ' + FormatFloat('#.########', v));
  v := RCLowPassZAtFreq(1000, 100e-9, 1000);
  ShowMessage('@2000Hz: ' + FormatFloat('#.########', v));
  v := RCLowPassZAtFreq(1000, 100e-9, 2000);
  ShowMessage('@5000Hz: ' + FormatFloat('#.########', v));
  v := RCLowPassZAtFreq(1000, 100e-9, 5000);
  ShowMessage('@10000Hz: ' + FormatFloat('#.########', v));
end;

procedure SelectFilter(filter : integer);
begin
  if filter = 0 then
    SelectRCLowPassFilter();
end;

end.

How can I fix the circular reference?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:33:00+00:00Added an answer on May 23, 2026 at 4:33 pm
    unit RCLowPass;
    interface
    
    uses
      ComplexMath, ExtraMath;
    
    procedure SelectRCLowPassFilter;
    
    implementation
    uses
      Unit2; // <<-- HERE
    
    { This is why I need Unit2. }
    procedure SelectRCLowPassFilter;
    begin
      // Setup form for RC Low Pass
      TForm2.Prop1Name.Caption := 'R1';
      TForm2.Prop1Name.Visible := true;
      ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a delphi unit, I have a global record called 'Context': interface type TContext
I have a Function called dbo.GetFoo(). I also have a unit-testing Stored Procedure called
I have a class called DataModel or something, which is basically a unit of
I have a unit test called TestMakeAValidCall() . It tests my phone app making
I have a unit test which contains the following line of code Site.objects.get(name=UnitTest).delete() and
I have an Xcode project with four targets. Two of them are called Unit
I have the following method for which I am trying to write a unit
I currently have a few unit tests which share a common set of tests.
I have a method that is called on an object to perform some business
I have a class called FooJob() which runs on a WCF windows service. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.