whetechnology.blogg.se

Clipper 5.3 For Windows
Clipper 5.3 For Windows







#command ? => QOut( ) ? "Hello, the weather is fine today" The first commands we encountered are defined in the file std.ch by these lines: #command CLS => Scroll() SetPos(0,0) Harbour commands are defined via the #command macro directive ( ). :-) You could also use clear screen or cls, although these two commands are not exactly the same of this clear (the difference will be clear later when we can GET the point - then, you could also appreciate the pun in this paragraph - but will more likely not). No, the purpose of this command is not to make the source code clear (that would be too easy! It is up to us to write clear source code, and to do so we must comment it well), but instead to clean the screen. None of these comments are accepted by xbscript, but hbrun (Harbour) accepts the last three. The second and the fourth commenting styles are derived from the C programming language, the first and the third are peculiar of the Clipper/xBase standard.

Clipper 5.3 For Windows

* This is an example of the fourth commenting style, You can write comments in many different styles: using an asterisk (*), two sweeps (//), a double ampersand (&) or a couple sweep-asterisk (/*) and asterisk-sweep (*/), as shown below: * This is a comment. It will be much more difficult if you are to modify programs written by others if they didn't comment them: figuring out what a program does using only its code is very difficult and even the cleanest programming language may prove to be write-only if not properly commented. If they aren't commenting, modifying them will be a very hard task. Commenting your programs will help you when you are to modify them later. We will learn later how to define and use functions and procedures. Of course, this feature is beneficial only if you use it to improve the code readability.

Clipper 5.3 For Windows

A function cannot be defined when typing in commands at the dot prompt (hbrun/xbscript).Įvery xBase language is case insensitive, which means that all the following lines are the same: function MAIN Defining such a function is not compulsory with Harbour, as if it is missed errors would occur during compilation, but I will keep it to make sure the examples work with all compilers. The first line defines a function named MAIN. We will comment on each line of the helloworld program.

Clipper 5.3 For Windows

(in GeoCities this and all other sources were highlighted by the on-line service CodeColorizer at, or, alternatively by the service at - they tend to look a bit better than the Wikibook highlighting). ? "Hello, the weather is fine today" return nil









Clipper 5.3 For Windows