About the Uses clause

General discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
Hristo
Posts: 33
Joined: 20 Oct 2014 14:39

About the Uses clause

#1 Post by Hristo » 01 May 2018 12:53

Are there any peculiarities in using the Uses clause in MikroPascal?
In Pascal and Delphi the Uses clause is strictly observed.
In a relatively large mikroPascal program I use one main program and 10 additional units. One unit is Variables and it is contained in the Uses clauses of all the rest.
Without meaning to, I failed to include one of the Units in the main program.
The Main Program uses procedures from this unit, which are themselves announced in the Interface section of the unit.
Then I tried to remove other units from the main program's Uses clause.
Without some of them, the compiler does NOT give an error and the program works normally.
Why is it so?

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: About the Uses clause

#2 Post by janni » 01 May 2018 15:21

That's one of the quirks of mP:
- including units in Project Manager leads to complete disregard of any unit dependencies introduced with uses clauses (any unit included in PM is connected directly to main - like there was a uses clause).

I've collected most of quirks and errors in one place (here).

Hristo
Posts: 33
Joined: 20 Oct 2014 14:39

Re: About the Uses clause

#3 Post by Hristo » 01 May 2018 18:35

Thank you, Janni

Post Reply

Return to “mikroPascal PRO for PIC General”