Can anyone give me an example how to create a module and use it.
ws
How to create a module an how to use the module in PASCAL?
- tihomir.losic
- mikroElektronika team
- Posts: 2138
- Joined: 02 Dec 2009 14:16
- Location: Serbia
- Contact:
Hello,
if you wanna to make and use new unit, first of all is to create new project. On menu file, you have option New unit. All of using and creating units are described in our help file. The main sections which have explanation about these two things are units and program organization.
In mikroPascal PRO for AVR, each project consists of a single project file and one or more unit files. Project file, with extension .mppav contains information about the project, while unit files, with extension .mpas, contain the actual source code.
Units allow you to:
1) break large programs into encapsulated parts that can be edited separately,
2) create libraries that can be used in different projects,
3) distribute libraries to other developers without disclosing the source code.
Each unit is stored in its own file and compiled separately. Compiled units are linked to create an application. In order to build a project, the compiler needs either a source file or a compiled unit file (.mcl file) for each unit.
Best regards,
Losic Tihomir
if you wanna to make and use new unit, first of all is to create new project. On menu file, you have option New unit. All of using and creating units are described in our help file. The main sections which have explanation about these two things are units and program organization.
In mikroPascal PRO for AVR, each project consists of a single project file and one or more unit files. Project file, with extension .mppav contains information about the project, while unit files, with extension .mpas, contain the actual source code.
Units allow you to:
1) break large programs into encapsulated parts that can be edited separately,
2) create libraries that can be used in different projects,
3) distribute libraries to other developers without disclosing the source code.
Each unit is stored in its own file and compiled separately. Compiled units are linked to create an application. In order to build a project, the compiler needs either a source file or a compiled unit file (.mcl file) for each unit.
Best regards,
Losic Tihomir
mikroElektronika [Support team]
Re: How to create a module an how to use the module in PASCA
Distributing just the compiled units won't reveal any source code.
You only need document the interface section (otherwise no-one will know how to use it!).
You only need document the interface section (otherwise no-one will know how to use it!).
To err is human; to moo, bovine.