Harbour (programming language): Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Added date. | Use this bot. Report bugs. | Suggested by Dominic3203 | Category:Query languages | #UCB_Category 11/66
Template:Infobox programming language parameters: cut whitespace characters to standardize, aid work on small screens, add, fill, move, update-standardize, underscores > spaces, reorder. WP:LINKs: update-standardize, add, needless WP:PIPE > WP:NOPIPE. WP:COPYEDITs WP:EoS: WP:TERSE, clarify. MOS:FIRSTABBReviation define < parenthetic WP:ABBR. Nonacronym proper noun MOS:ALLCAPS > sentence case. Cut carriage returns in paragraphs.
Line 6:
{{Use dmy dates|date=June 2014}}
{{Infobox programming language
| name = Harbour Project
| logo =
| logo caption =
| screenshot =
| paradigm = [[Multi-paradigm programming language|multi-paradigm]]: [[Imperative programming|imperative]], [[Functional programming|functional]], [[Object-oriented programming|object-oriented]], [[Reflective programming|reflective]]
| screenshot caption =
| year = {{Start date and age|1999}}
| paradigm = [[Multi-paradigm programming language|multi-paradigm]]: [[Imperative programming|imperative]], [[Functional programming|functional]], [[Object-oriented programming|object-oriented]], [[Reflective programming|reflective]]
| designer = Antonio Linares
| developer = Viktor Szakáts and community
| latest_release_version = 3.0.0
| latest_release_date released = {{Start date and age|df=yes|2011|07|171999}}
| latest release version = 3.0.0
| latest_preview_version = [https://sourceforge.net/projects/harbour-project/files/binaries-windows/nightly/ 3.2.0dev]
| latest release date = {{Start date and age|2011|07|17|df=yes}}
| typing = Optionally [[duck typing|duck]], [[dynamic typing|dynamic]], [[type safety|safe]], partially [[strong typing|strong]]
| latest_preview_versionlatest preview version = [https://sourceforge.net/projects/harbour-project/files/binaries-windows/nightly/ 3.2.0dev]
| implementations =
| typing = Optionally [[duck typing|duck]], [[dynamic typing|dynamic]], [[type safety|safe]], partiallypartly [[strongStrong and weak typing|strong]]
| dialects = Clipper, Xbase++, FlagShip, FoxPro, xHarbour
| implementations =
| influenced_by = dBase, Clipper
| influenceddialects = Clipper, Xbase++, FlagShip, =FoxPro, xHarbour
| operating_system operating system = [[Cross-platform software|Cross-platform]]
| license = [[Open-source license|Open-source]] [[GNU General Public License|GPL]]-compatible
| website = {{URL|https://harbour.github.io/}}
| file_ext file ext = .prg, .ch, .hb, .hbp
| wikibooks =
| influenced by = [[dBase]], [[Clipper (programming language)|Clipper]]
| influenced = xHarbour
}}
 
'''Harbour''' is a computer [[programming language]], primarily used mainly to create database/business programs. It is a modernised, [[Open-source software|open source]] and [[cross-platform]] version of the older [[Clipper (programming language)|Clipper]] system, which in turn developed from the [[dBase]] database market of the 1980s and 1990s. It is [[free and open-source software]] which license is [[GNU General Public License]] (GPL) compatible.
 
Harbour code uses the same databases and can be compiled under a wide variety of platforms, including [[Microsoft Windows|Windows]], [[Linux]], [[Unix]] variants, several [[BSDBerkeley Software Distribution]] (BSD) descendants, [[Mac OS XmacOS]], [[MINIXMinix 3]], [[Windows CE]], [[Pocket PC]], [[Symbian]], [[iOS]], [[Android (operating system)|Android]], [[QNX]], [[VxWorks]], [[OS/2]] (including [[eComStation]] and [[ArcaOS]]),<ref>{{cite web|url=https://ecsoft2.org/harbour|access-date=2020-09-03|title=Harbour}}</ref> [[BeOS]]/[[Haiku (operating system)|Haiku]], [[IBM AIX|AIX]], and [[DOS]].
[[IBM AIX|AIX]] and [[MS-DOS]].
 
==History==
The idea of a free software Clipper compiler had been floating aroundarising for a long time and the subject hasoccurred often cropped up in discussion on comp.lang.clipper. Antonio Linares founded the Harbour project and the implementation was started in March 1999. The name "Harbour" was proposed by Linares, it is a play on a [[Clipper ship|Clipper]] as a type of ship. Harbour is a synonym for port (where ships dock), and Harbour is a port of the Clipper language.
 
In 2009, Harbour was substantially redesigned, mainly by Viktor Szakáts and Przemyslaw Czerpak.
Line 46 ⟶ 47:
 
==Programming philosophy==
Harbour aims to be [[Write once, compile anywhere|written once, compiled anywhere]]. As the same compiler is available for all of the above operating systems, there is no need for re-coding to produce identical products for different platforms, except when operating system dependent features are used. Cross-compiling is supported with [[MinGW]]. Under Microsoft Windows, Harbour is more stable but less well-documented than Clipper, but has multi-platform ability and is more transparent, allows for more customisation and can run from a USB flash drive.
Under Microsoft Windows, Harbour is more stable but less well-documented than Clipper, but has multi-platform capability and is more transparent, allows for more customisation and can run from a USB flash drive.
 
Under Linux and Windows Mobile, Clipper source code can be compiled with Harbour with very little adaptation. Most software originally written to run on Xbase++, FlagShip, FoxPro, xHarbour and others dialects can be compiled with Harbor with some adaptation. As of 2010 many efforts have been made to make the transition from other [[xBase]] dialects easier.
Line 55:
[[MinGW]],
[[Clang]],
[[Intel C++ Compiler|ICC]] (ICC),
[[Microsoft Visual C++]] (6.0+),
[[Borland C++]],
Line 117:
Hashes may use ''any'' type including other Hashes as the ''Key'' for any element. Hashes and Arrays may contain ''any'' type as the ''Value'' of any member, including nesting arrays, and Hashes.
 
Codeblocks may have references to Variables of the Procedure/Function>method in which it was defined. Such Codeblocks may be returned as a value, or by means of an argument passed {{monocode|BY REFERENCE}}, in such case the Codeblock will "outlive" the routine in which it was defined, and any variables it references, will be a {{monocode|DETACHED}} variable.
 
Detached variables will maintain their value for as long as a Codeblock referencing them still exists. Such values will be shared with any other Codeblock which may have access to those same variables. If the Codeblock did not outlive its containing routine, and will be evaluated within the lifetime of the routine in which it is defined, changes to its ''Detached Variables''(s) by means of its evaluation, will be reflected back at its parent routine.
 
Codeblocks can be evaluated any number of times, by means of the {{monocode|Eval( ''BlockExp'' )}} function.
 
===Variables===
Line 128:
'''Variables have one of the following scopes:'''
 
* {{monocode|LOCAL}}: Visible only within the routine which declared it. Value is lost upon exit of the routine.
* {{monocode|STATIC}}: Visible only within the routine which declared it. Value is preserved for subsequent invocations of the routine. If a STATIC variable is declared before any Procedure/Function/Method is defined, it has a MODULE scope, and is visible within any routine defined within that same source file, it will maintain its life for the duration of the application lifetime.
* {{monocode|PRIVATE}}: Visible within the routine which declared it, and all routines {{monocode|called}} by that routine.
* {{monocode|PUBLIC}}: Visible by {{monocode|all}} routines in the same application.
 
{{monocode|LOCAL}} and {{monocode|STATIC}} are resolved at compile time, and thus are much faster than {{monocode|PRIVATE}} and {{monocode|PUBLIC}} variables which are dynamic entities accessed by means of a runtime [[Symbol table]]. For this same reason, {{monocode|LOCAL}} and {{monocode|STATIC}} variables are {{monocode|not}} exposed to the Macro compiler, and any macro code which attempts to reference them will generate a runtime error.
 
Due to the dynamic nature of {{monocode|PRIVATE}} and {{monocode|PUBLIC}} variables, they can be created and destroyed at runtime and can be accessed and modified by means of runtime macros or by Codeblocks created on the fly.
 
=== Control structures ===
Line 363:
 
==GUI libraries and tools==
* '''[https://sourceforge.net/projects/qtcontribs/ hbide]''' – [[Integrated Development Environment]] to help Harbour development and various xBase dialects
* '''[https://ptsource.github.io/Developer-Platform/ PTSource IDE]''' – [[Integrated Development Environment]] includes Harbour
* '''[https://sourceforge.net/projects/hwgui/ HwGui]''' – Open Source cross-platform GUI library for Harbour
* '''[https://hmg.ruano.org/index.php HMG]''' – Free /, Open Source xBase [[Win32]] / [[GUI]] Development System for Harbour
* '''[http://hmgextended.com/ MiniGUI]'''<ref>{{cite web|author=vailtom |url=https://sourceforge.net/projects/hmgs-minigui/ |title=Harbour MiniGUI Extended Edition. &#124; Free Communications software downloads at |publisher=Sourceforge.net |date=17 August 2009 |access-date=2013-12-09}}</ref> – Free / Open Source xBase Win32 / GUI Development System (a [[Fork (software development)]] of both HMG and Harbour)
* '''[https://oohg.github.io/ ooHG]''' – Object Oriented Harbour GUI – a fork "class based and oop programming" of HMG
* '''[http://marinas-gui.org/ Marinas-GUI]''' – Multi-Platform QT Based GUI Development Package for Harbour. Marinas-GUI downloads as a complete installation package for the chosen target platform (IDE, Version Control, Harbour/C Compiler, Libraries etc.) – Basically install and start coding and compiling
 
==See also==
* [[Visual FoxPro]]
* [[Visual Objects]]
* [[XBase++|Xbase++]]
* [[PWCT]] free open source visual programming language support Harbour through [[PWCT#Visual Languageslanguages|HarbourPWCT]]
 
==References==
Line 381:
 
==External links==
* {{officialOfficial website|https://harbour.github.io}}
* [https://harbour.github.io/the-oasis/ The Oasis] Clipper, FoxPro and Xbase++ community repository
* [http://hbide.vouch.info/ HBIDE]
Line 387:
* [https://groups.google.com/group/harbour-users/ Harbour Users Mailing List]
* [http://www.kresin.ru/en/harbour.html Extensive Harbour documentation, libraries, tools site]
* [https://github.com/{{GitHub|Petewg/harbour-core/wiki}}, Harbour WikiDictionary (Harbourof Functions Dictionary)]Wiki
 
{{xBase}}
Line 409:
[[Category:Multi-paradigm programming languages]]
[[Category:Table-oriented programming]]
<!-- Hidden categories below -->
[[Category:Articles with example code]]