mirror of
https://github.com/dschmenk/PLASMA.git
synced 2024-12-22 02:31:12 +00:00
Updated Home (markdown)
parent
103c671a35
commit
122c7602fc
4
Home.md
4
Home.md
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
These pages are for documenting and discussing the libraries and sample code supplied with PLASMA. The language is documented on the main page and hopefully answers any language specific questions.
|
These pages are for documenting and discussing the libraries and sample code supplied with PLASMA. The language is documented on the main page and hopefully answers any language specific questions.
|
||||||
|
|
||||||
PLASMA has grown over a number of years and certain constructs have been developed over that time. As a result, some samples may look slightly different than others. Libraries, for instance, have been worked out to provide an API based on function pointers. This allows machine differences to be determined at run time and hidden from other modules. Each library will provide a header file that exports a pointer to a function list as a structure. To call a library function, it will something like:
|
PLASMA has grown over a number of years and certain constructs have been developed over that time. As a result, some samples may look slightly different than others. Libraries, for instance, have been worked out to provide an API based on function pointers. This allows machine differences to be determined at run time and hidden from other modules. Each library will provide a header file that exports a pointer to a function table as a structure. To call a library function, it will look something like:
|
||||||
```
|
```
|
||||||
libAPI:someFunc()
|
libAPI:someFunc()
|
||||||
```
|
```
|
||||||
If the function doesn't have any parameters, the `()` are still required because the function will be accessed as just a `word` without them. The syntax superficially resembles object oriented language constructs and not by accident.
|
If the function doesn't have any parameters, the `()` are still required because the function will be accessed as just a `word` without them. The syntax superficially resembles object oriented language constructs and not by accident. Note that function pointers don't get the same parameter/return values checking that regular function definitions get. The libraries APIs all return one value from every function so there isn't a danger of forgetting to override the return value count. However, the parameter counts aren't verified so you need to beware of getting them correct.
|
||||||
|
|
||||||
In no particular order...
|
In no particular order...
|
Loading…
Reference in New Issue
Block a user