External: what changed
Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | - | ||
| 1 | + | Back to [[Reserved words]]. | |
| 2 | 2 | ||
| 3 | - | ||
| 4 | - | ||
| 3 | + | The **external** modifier: | |
| 5 | 4 | ||
| 6 | - | ||
| 7 | - | ||
| 5 | + | - belongs to the calling conventions for external subroutines (eg dynamically loaded libraries); | |
| 6 | + | - allows access to an external subroutine. | |
| 8 | 7 | ||
| 9 | - | ||
| 10 | - | ||
| 11 | - | ||
| 12 | - | ||
| 13 | - | ||
| 14 | - | ||
| 15 | - | ||
| 8 | + | Examples: | |
| 9 | + | ||
| 10 | + | ``` pascal | |
| 11 | + | ... | |
| 12 | + | function funcTest(strTestData : Pchar) : LongWord; cppdecl; external 'Test.dll'; | |
| 13 | + | ... | |
| 16 | 14 | ``` | |
| 17 | - | ||
| 18 | - | ||
| 19 | - | ||
| 15 | + | ||
| 16 | + | ``` pascal | |
| 17 | + | ... | |
| 18 | + | function funcTest(strTestData : Pchar) : LongWord; cppdecl; external 'test.dylib'; | |
| 19 | + | ... | |
| 20 | 20 | ``` | |
| 21 | 21 | ||
| 22 | 22 | --- | |
| 23 | - | ||
| 23 | + | *From the Free Pascal wiki, page "External", as it stood on 2020-02-14 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
