layout | title |
---|---|
default |
Code Examples |
This is a small collection of short examples from Harbour's test directory.
{% for cat in site.example_categories %}* [{{ cat | capitalize }}](#{{ cat }}) {% endfor %}* How to build/run applications
{% for cat in site.example_categories %}
{% for example in site.example %}{% if example.category == cat %}* [{{ example.title_long }}]({{ site.baseurl }}/example/{{ example.slug }}{{ site.ilink_suffix }}) {% endif %}{% endfor %} {% endfor %}
You can find many more examples in the source package of Harbour.
Look into the [tests
](https://github.com/{{ site.repo_slug }}/tree/{{ site.repo_branch }}/tests)
and [extras
](https://github.com/{{ site.repo_slug }}/tree/{{ site.repo_branch }}/extras)
directories to find them, but the best example is the source code of
Harbour itself.
[Build](https://github.com/{{ site.repo_slug }}/blob/{{ site.repo_branch }}/utils/hbmk2/doc/hbmk2.en.md):
$ hbmk2 app.prg
$ ./app
or [run](https://github.com/{{ site.repo_slug }}/blob/{{ site.repo_branch }}/contrib/hbrun/doc/hbrun.en.md) them as scripts:
$ hbrun app.prg