Command Line Issues

Harbour switch handling spec


This spec goes for CLIPPERCMD, HARBOURCMD, Harbour
compiler and #pragma directives in the source code.

The command line always overrides the envvar.

Note that some switches are not accepted in envvar,
some others in #pragmas.

First the parser should start to step through
all the tokens in the string separated by
whitespace. (or just walk through all argv[])

1.) If the token begins with “-“, it
should be treated as a new style switch.

One or more switch characters can follow
this. The “-” sign inside the token
will turn off the switch.

If the switch has an argument all the following
characters are treated as part of the argument.

The “/” sign has no special meaning here.

Switch Resulting options

-wn ( W N )
-w-n ( !W N )
-wi/harbour/include/ ( W I=/harbour/include/ )
-wi/harbour/include/n ( W I=/harbour/include/n )
-wes0n ( W ES=0 N )
-wen ( W [invalid switch: e] N )
-wesn ( W ES=Default(0) N )
-wses ( W S ES=Default(0) )
-wess ( W ES=Default(0) S )
– ( [invalid switch] )
-w-n-p ( !W !N P )
-w-n-p- ( !W !N !P )

-w- -w -w- ( finally: !W )

2.) If the token begins with “/”, it
should be treated as a compatibility style switch.

The parser scans the token for the next “/” sign or EOS
and treats the resulting string as one switch.

This means that a switch with an argument containing
“/” sign has some limitations. This may be solved by
allowing the usage of quote characters. This is mostly
a problem on systems which use “/” as path separator.

The “-” sign has no special meaning here, it can’t be
used to disable a switch.

Switch Resulting options

/w/n ( W N )
/wo/n ( [invalid switch: wo] N )
/ihello/world/ ( I=hello [invalid switch: world] [invalid switch: /] )
/i”hello/world/”/w ( I=hello/world/ W )
/ihello\world\ ( I=hello\world\ )

3.) If the token begins with anything else it should
be skipped.

The Harbour switches are always case insensitive.

In the Harbour commandline the two style can be used together:
harbour -wnes2 /gc0/q0 -iC:\hello


– Handling of the /CREDIT undocumented switch
on Harbour command line is unusual, check the current code
for this.

– The CLIPPER, HARBOUR and Harbour application
command line parsing is a different beast,
see cmdarg.c for a NOTE.

Just some examples for the various accepted forms:
//F20 == /F20 == F20 == F:20 == F20X
F20//TMPPATH:/temp///F:30000000 NOIDLE

“//” should always be used on the command line.
[ Copyright (c) 1999-2009 Viktor Szakats (
Licensed under Creative Commons Attribution-ShareAlike 3.0:
See COPYING.txt. ]

Source :


What is UI ( User Interface )

The user interface (UI) , in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of this interaction is effective operation and control of the machine on the user’s end, and feedback from the machine, which aids the operator in making operational decisions. Examples of this broad concept of user interfaces include the interactive aspects of computer operating systems, hand tools, heavy machinery operator controls, and process controls. The design considerations applicable when creating user interfaces are related to or involve such disciplines as ergonomics and psychology.

A user interface is the system by which people (users) interact with a machine. The user interface includes hardware (physical) and software (logical) components. User interfaces exist for various systems, and provide a means of:

Input, allowing the users to manipulate a system Output, allowing the system to indicate the effects of the users’ manipulation

Generally, the goal of human-machine interaction engineering is to produce a user interface which makes it easy (self exploratory), efficient, and enjoyable (user friendly) to operate a machine in the way which produces the desired result. This generally means that the operator needs to provide minimal input to achieve the desired output, and also that the machine minimizes undesired outputs to the human.

With the increased use of personal computers and the relative decline in societal awareness of heavy machinery, the term user interface is generally assumed to mean the graphical user interface, while industrial control panel and machinery control design discussions more commonly refer to human-machine interfaces.

Other terms for user interface include human–computer interface (HCI) and man–machine interface (MMI).


Source and more info

CLI (command-line interface)

A command-line interface (CLI), also known as command-line user interface, console user interface, and character user interface (CUI), is a means of interacting with a computer program where the user (or client) issues commands to the program in the form of successive lines of text (command lines).

The CLI was the primary means of interaction with most popular operating systems in the 1970s and 1980s, including MS-DOS, CP/M, Unix, and Apple DOS. The interface is usually implemented with a command line shell, which is a program that accepts commands as text input and converts commands to appropriate operating system functions.

Command-line interfaces to computer operating systems are less widely used by casual computer users, who favor graphical user interfaces. Command-line interfaces are often preferred by more advanced computer users, as they often provide a more concise and powerful means to control a program or operating system.

Programs with command-line interfaces are generally easier to automate via scripting.

Alternatives to the command line include, but are not limited to menus, keyboard shortcuts, and various other desktop metaphors centered on the pointer (usually controlled with a mouse).

Source and more info


TUI (Text-based user interface)

Text-based user interface (TUI), also called textual user interface or terminal user interface, is a retronym that was coined sometime after the invention of graphical user interfaces, to distinguish them from user interfaces that were text-based. The concept of TUI refers primarily to the way of output and does not coincide with command-line interfaces which is a certain user input mode. An advanced TUI may, like GUIs, use the entire screen area and does not necessarily provide line-by-line output, although TUIs only use text, symbols and colors available on a given text environment.

Source and more info


GUI ( graphical user interface )

In computing, graphical user interface (GUI, is a type of user interface that allows users to interact with electronic devices through graphical icons and visual indicators such as secondary notation, as opposed to text-based interfaces, typed command labels or text navigation. GUIs were introduced in reaction to the perceived steep learning curve of command-line interfaces (CLI), which require commands to be typed on the keyboard.

The actions in GUI are usually performed through direct manipulation of the graphical elements. Besides in computers, GUIs can be found in hand-held devices such as MP3 players, portable media players, gaming devices, household appliances, office, and industry equipment. The term GUI is usually not applied to other low-resolution types of interfaces with display resolutions, such as video games (where HUD is preferred), or not restricted to flat screens, like volumetric displays because the term is restricted to the scope of two-dimensional display screens able to describe generic information.


Source and more info