One of the most important targets of CLIP is Clipper compatibility. But when the compatibility gets in contradiction with the functionality, the latter is chosen as more important. This is the cause of the part of uncompatibilities. Cause of another part of uncompatibilities is distinction of the Unix platform (e.g. different file systems and terminal capabilities).
GCC 3.2.x have bugs, CLIP does not support it.
As a rule, in Unix user should press ESC key twice. CLIP makes possible to avoid that inconvenience by emulating second ESC in some interval of keyboard quietness. The length of that interval is controlled by SET(_SET_ESC_DELAY,<nMilliseconds>). See also about SCANMODE.
SETBLINK() function does not work with CLIP under Unix (it always returns .T.). When you use BLINK attribute ('*' in clipper color definition) some terminals display blinking text others highlight background. Linux console in VGA text mode blinks, in FB mode highlights background. If you are using text mode console you can use SVGATextMode program to switch VGA adapter in BG-HI mode (look at option "16color" in /etc/TextConfig). If you are using other terminal you have to find a way how to switch them into proper mode.
Because it cannot be controlled from server side maybe you will find interesting this function:
blinkattr( [lEnable] ) -> lPrevState
which allow to block sending BLINK attribute from a CLIP application to the terminal. So if you won't be able to set terminal in BG-HI mode you can disable using BLINK attribute (blinkattr(.f.)) and the text won't blink (but their background won't be highlighted too). Thanks for the info to Przemyslaw Czerpak.
Some RDD functions (e.g. DBSKIP()) don't generate EG_NOTABLE error when there are no work areas in use with Clipper 5.01. But with Clipper 5.3 (and Clipper 5.2) error is generated. In such case CLIP works like Clipper 5.3.
It is impossible to open a table in EXCLUSIVE READONLY mode with CLIP under Unix. In such case table is opened in SHARED READONLY mode. The cause is the difference between DOS's and Unix file locking mechanism.
AS and REF are reserved keywords in CLIP. See description of the -q switch in the compiler options section.
In Clipper, CHR(<nConst>) is constant (translated at compile time). In CLIP CHR() is as usual function as others, it is always evaluated at run time.
CLIP can work in two modes: fullscreen and stream. Just started, a CLIP application is working in the stream mode, i.e. all application's output is placed in the stdout stream. An application works in this mode until any full screen operation (e.g. displaying a window, displaying data at a specified screen row and column or polling keyboard) is performed (this mode is useful for CGI applications, for example). When any full screen operation is performed, application initializes terminal, switches to fullscreen mode and stops output to the stdout stream.
Follow these two simple rules:
In the Unix file system, file mask *.* means all files with a dot ('.') in their names. Use the FILE_MASK macro instead of '*.*'. FILE_MASK is platform dependent constant ('*' in Unix, '*.*' in Windows).
Do not use the keywords (FIELD, WHILE, FOR, CASE, END, etc) as the names of variables.
In some circumstances, the IF(,,) function is discerned as IF ... ELSE ... ENDIF statement. In such cases compiler generates a warning.
With Clipper, the TYPE() function invokes some functions (e.g. SUBSTR()) and does not invoke anothers (e.g. ALERT()). CLIP does not invoke any function and returns 'UI' for expressions containing any function calls.
Clipper have an odd feature:
if NIL==0 // generates run-time error if (NIL==0) // OK
This feature is not supported by CLIP (both examples are OK).
Unix file system does differentiate the case of letters in the file names (USE table.dbf and USE TABLE.DBF are not equivalent commands). To help porting DOS-applications to Unix SET TRANSLATE PATH ON command is intended. When ON all file (and directory) names are translated to the lower case. In this case the full path to the file and the file itself must be in the lower case on the disk. When OFF the translation is not performed. In this case names of the files on the disk must correspond to the names they are addressed by.
Disk names (C:, D:, etc) can be assigned to the directories in the following manner:
By default, disk C: is assigned to the root directory (/).
The INDEXEXT() function returns the index's suffix in the lower case.
Displaying of double pseudographic symbols is not possible on some types of terminals. It is possible by using termcap instead of terminfo (export TERMCAP=/etc/termcap and look at g1 entry for single graphic chars and g2 entry for double graphic chars in /etc/termcap).
Displaying of the chars with codes less than 32 is impossible on Unix terminals. These chars are displayed as highlighted char with the code <nSymbol> + 32.
You should recollect DISPBEGIN(), DISPEND() functions. Those who have long been working with terminals must understand well why it is necessary. As for novices, they should read attentively the description of these functions and imagine how information runs via narrow commiunication channels from the server to terminals and how the processor is loaded, while outputting information. To use them is not necessary, but it's desirable, particularly in those places where you display and process the input from the keyboard themselves. In those functions and commands (PROMPT/MENU, GET/READ, etc) where the processing of the display and keyboard is executed independently, an optimal output mode has been already used, and so enclosing them by DISPBEGIN() and DISPEND() is unnecessary.
The restriction of the function/procedure name size of 10 chars has been removed. It applies equally to variable names. To simplify the transition to a length of more than 10 symbols, you can use #xdefine directive (case-insensitive #define).
The restriction of the string size of 64k has been removed.
The restriction of the array size of 4096/8192 elements has been removed.
The MEMOEDIT() function is based on the TEXTEDIT class, and there may be some problems with user functions for MEMOEDIT().
get:baddate() is a method, not an attribute.
TBrowse object is visualised not quite so as a standard one is, which eliminates problems with number of displayed fields and cursor positioning, when navigating over the table in user functions.
RUN command output damages current screen contents. When outputting to the terminal, this problem cannot be completely solved without resorting to tricks, as it turns out that several programs output independently to one device, in the same way as if several programs, independent of each other, output information to one COM port. We recommend to use something like:
run &command wait "Press any key" clear screen // or restore screen
And one more peculiarity of the RUN command - in Unux, it runs the shell, then shell executes the program. Though run cd mydir will operate, but after exiting from the shell the current directory will remain the same.
In error object, there is some incompatibility.
It is preferable to use inkey(0.1) instead of inkey(), otherwise an application will use too much of processor time. In particular, we had to make some changes in DBU concerning INKEY() and stabilization in TBrowse; these changes are enclosed by #ifdef __CLIP__.
RESTORE FROM always operates as with ADDITIVE.
The SET PROCEDURE command is not and probably will not be supported. Link the whole program from object files by using CLIP or use the new features relating to PO-files; read about LOAD() function.
The SETCOLOR() function have 10 pair colors, new 5 pair don`t have any special meaning.