Conversion of Dataflex Programs to PFXplus
What Powerflex Supports | PFXplus Differences | PFXplus Extensions | Compiling Dataflex Programs | PFXplus Enhancements
Not sure how the conversion will benefit you? Read the overview.
Not only is PFXplus a much faster and more powerful product than Dataflex, it is also very compatible with Dataflex 2.3b, making your conversion from Dataflex 2.3b to PFXplus quick and easy.
Conversion time will very much depend on the source code itself - mostly on the use of macros, changes to FMAC and whether the code is procedural or object-oriented. PFXplus does not support Dataflex object-oriented code; this will need to be rewritten to procedural before conversion.
Later versions of Dataflex (post 2.3b) may require more work to convert to PFXplus because of the extra capabilities included in later versions, which may or may not be compatible with PFXplus .
PFXplus 5.0 online help contains a Dataflex Conversion Checklist, which should assist you with your conversion to PFXplus a great deal.
We are so sure of our products that they all come with a 30 day money-back guarantee, as well as 60 days free Priority One support for new developers, and a range of support options to suit your needs. See Support for Warranty and Support conditions.
For installation-related issues you are also entitled to a free Priority One support for 30 days after the purchase .
What PFXplus Supports
PFXplus is highly compatible with Dataflex procedural source code. The PFXplus Compiler can compile and run most programs written for version 2.3 absolutely unchanged. Where changes are required they are usually quite minor and the changed program still compiles correctly under Dataflex.
PFXplus also supports most of the procedural features of Dataflex 3.x. The PFXplus Compiler can compile and run most programs written for version 3.x unchanged or with minor changes.
PFXplus is highly compatible with Dataflex data files. A compiled PFXplus application program can read all data files created by Dataflex 2.3 and 3.x, and can write data files which Dataflex 2.3 and 3.x will accept. Given suitable configuration settings it can even use FILELIST.CFG and PFERROR.DAT unchanged.
Top of Page
PFXplus is designed to be highly compatible with existing Dataflex source code and data files in order to take advantage of your investment in existing programs. It differs in many other respects. In converting programs to PFXplus you must expect to find some differences, most of them intentional. PFXplus has its own file naming conventions, environment variables, color combinations, screen characters and function keys. You may if you wish customise some of these aspects to be more familiar. Details are to be found in the PFXplus 5.0 on-line help - sections on Installation and Configuration.
PFXplus does not support the Dataflex 2.3 Graphics statements. PFXplus supports most Dataflex macro statements such as #INCLUDE, #COMMAND, #REPLACE, #SET, #IF, #IFDEF, #IFSAME, #IFCLASS, #IFTYPE, #ELSE and #ENDIF, together with arguments !0 to !9 and compile-time variables !a to !z and !A to !Z.PFXplus does not support the Dataflex 3.x object-oriented constructs. It supports the new string expressions and EVAL( ). It supports the new sequential file drivers, channels and constraints but there are differences.
Writing a zero filled numeric value, for example 000125.50, into ASCII file removes zeros resulting in number 125.5. Formatting function can be used to retain leading and decimal zeros in the output ASCII file.
PFXplus compiler recognizes a number of directives and other symbols used in Dataflex programming even though PFXplus itself does not use them. These symbols include the following.
#CHECK #FORMAT #FREF #IFIND #XPOP #XPUSH
Top of Page
The Powerflex language extends well beyond supporting existing Dataflex programs.
PFXplus has arrays, procedures, user defined functions, enhanced syntax for expressions, logical expressions including AND and OR, bit-wise arithmetic operations, operator precedence, new statements for support of ENTER and REPORT, new statements BEEP, BOX, CALL_BINARY, COLOR_MAP, COLOR_WINDOW, CLOSE_PANEL , CURSOR, DECREMENT, DELAY, DISK_SPACE, ENCRYPT, ENTRESET, FILE_DEF, FILE_SET, FIELD_DEF, FIELD_SET, FRAME, GET_ENV, HEX, INDEX_SET, INP, INTDOS, INT86X, LOAD_BINARY, KEY_MAP, MOUSE commands, OPEN_PANEL, OVERLAY, OUTP, PANEL_SET, PEEK, PEEKW, POKE, POKEW, RANDOM, REINDEX, SCROLL, SCROLL_MODE, SYSTIME, TONE and UNLOAD_BINARY, and extended syntax for existing statements including ABORT, DIRECTORY, FIELD_DEF, FOR, INDEX_DEF, LOCK, RENAMEFILE, SYSTEM and UNLOCK.
PFXplus also has temporary indexes, in-memory data tables, global, shared and private modules, buttons, multi-line edit, list-boxes, GET_SCREEN and SET_SCREEN, callbacks for ENTRY, ACCEPT, keyboard input and error handling, optimised file constraints, SET_TERMTYPE, ENTRY to variables, IMAGE, FILE, WINDOW and FIELD functions, CLASS and OBJECT statements and lots more.
Top of Page
Compiling Dataflex Programs
If you have followed the rules in the Dataflex manuals, your programs should compile correctly first time. For example, most of the sample programs supplied with Dataflex 2.3 (other than those using graphics) compile and run unchanged. This includes MENUDEF.SRC, READ.SRC, FLEXERRS.FRM and programs generated by DFQUERY and DFAUTO.
If your programs use undocumented features, #COMMAND macros, a modified FMAC, or have taken advantage of certain peculiarities of Dataflex, you will have a little more work to do. For example, the standard Dataflex programs MENU.SRC and DELQRY.SRC do not compile immediately because of the use of I-code and other undocumented features. After working through the conversion checklist in the PFXplus 5.0 on-line help they compile and run fine.
PFXplus compiler enables various levels of data source compatibility by specifying iCompatibility in the pfx.ini configuration file. This can be useful in programs where < and > operators mean MIN and MAX.
Top of Page
This is a very brief summary to let the experienced programmer know about PFXplus enhancements. You will need to consult the Powerflex Lexicons for further details.
- Arrays of Indicators, Integers, Dates, Numbers, Reals and Strings with up to 8 dimensions. Single-dimensioned arrays of windows and database fields are also supported.
- User-defined procedures and functions which may be used instead of macros (#COMMAND) to extend the language. They may have any number of parameters and allow true local variables.
- Panels are regions of the screen (windows in other systems) which may be created, displayed and hidden, moved, re-sized and removed, using OPEN_PANEL, PANEL_SET and CLOSE_PANEL. All screen output is directed to and confined within the active panel. When a panel is moved, hidden or closed the underlying screen or panel is restored.
- Colour Mapping allows any logical colour (as used by the SCREENMODE and other commands) to be mapped into any physical colour (as seen on the screen), using COLOR_MAP and tColorMap.
- Keyboard Mapping allows any key on the standard keyboard to generate any desired logical key character, and allows Mouse clicks to generate keystrokes, using KEY_MAP, tKeyMap and MOUSE.
- Images may be placed anywhere in a program, or in an included file.
- Page and Unpage images using PAGE SAVE and PAGE CLEAR.
- Improved cursor and color control using CURSOR, COLOR_WINDOW, CLEARLINE, AUTOCLEAR, COLOR=.
- Enhanced User Interface with word-processing backspace, home and end keys, move and delete by word, toggle insert/overtype mode, clear field or to end of field.
- Buttons defined by RADIO, CHECKBOX and PUSHBUTTON.
- Multi-line edit boxes with scrolling and word wrap.
- Multi-line list-boxes using COMBOLIST and PICKLIST.
- Box drawing allows boxes to be drawn on the screen or in a panel using the extended character set, with BOX or FRAME.
- Support for all MSDOS Text Video Modes (0, 1, 2, 3 and 7) and text screen sizes (40 and 80 columns, 25, 43 and 50 rows) as well as custom modes. (MSDOS)
- Support for all terminal types supported by curses and terminfo, and includes extended character support where available. (Unix)
- Mouse is provided via the statements MOUSE, MOUSECURSOR, MOUSEGETXY, MOUSEGOTOXY, MOUSELIMIT, MOUSESPEED, KEY.CLICK and KEY.CLICK2. (MSDOS)
- 250 File Limit Abolished allowing file numbers up to 32767.
- Database file structure maintenance allows database files to be created and maintained programmatically using CREATE_FILE, FILE_SET, FILE_DEF, INDEX_SET, INDEX_DEF, FIELD_SET, FIELD_DEF.
- Database file re-indexing allows database indexes to be created and maintained programmatically using REINDEX, FILE_SET, INDEX_SET, INDEX_DEF.
- New database file structures include Mark 1 (10 indexes), Mark 2 (16 indexes, 16 segments, descending), Mark 3 (data compression) and Mark 4 (Btrieve).
- Full support for using Btrieve as a Database Engine with Mark 4 data files, using BTRIEVE, BEGIN_TRANSACTION, ABORT_TRANSACTION and END_TRANSACTION.
- Enhanced sequential file support with up to 20 channels, file positioning, configurable modes and items, new drivers using the CHANNEL phrase, SET_CHANNEL, SEEK, SEQPOS( ) and EOF( ).
- Enhanced string functions include APPEND( ), ASCII( ), CENTER( ), CHARACTER( ), INSERT( ), LEFT( ), LOWERCASE( ), LTRIM( ), MID( ), OVERSTRIKE( ), PAD( ), REMOVE( ), REPEAT( ), REPLACE( ), REPLACES( ), RIGHT( ), RTRIM( ), TRIM( ) and UPPERCASE( ).
- Enhanced runtime expression evaluator with access to variables, arrays, predefined functions and user-defined functions, using EVAL( ).
- Other enhanced functions include IF( ), WINDOW( ) and FIELD( ).
- New data functions DAY( ), MONTH( ), YEAR( ) and DOW( ).
- Improved operating system interface with many portable commands, including COPYFILE, DELAY, DIRECTORY, DISK_SPACE, ERASEFILE, RENAMEFILE. ABORT and SYSTEM return a code to the operating system.
- Access to environmental information provides the contents of internal and external environment variables, available disk space, date and time and other information using GET_ENV, DISK_SPACE, SYSDATE and SYSTIME.
- Low-level operating system support allows direct calls to MSDOS or any software interrupt, direct access to hardware ports and direct access to the contents of memory using INTDOS, INT86X, INP, OUT, PEEK, PEEKW, POKE and POKEW.
- Improved sound support, using BEEP, DELAY, SOUND and TONE. (MSDOS)
- National Language Support for date, time, currency, thousands and decimal separator, automatically obtained from the operating system where possible. (MSDOS)
- Variable GOSUB support using the INTEGER( ) function and the LABEL( ) together with GOTO, GOSUB and RETURN.
- Enhanced arithmetic expressions, which do not have to be enclosed in parentheses if there is no ambiguity, can be of arbitrary complexity, and can mix data values of any type freely with implicit conversions.
- Enhanced logical expressions can use AND, OR, NOT and parentheses. (While GROUP ANY and so on are still supported they are unnecessary and obsolete.)
- Operator precedence, so 1+2*3 is 7. This can be disabled by /P.
- Improved mathematical support with bit-wise ANDs and ORs, XOR, decrement, convert to hexadecimal, extract words from an INTEGER, and a high quality random number generator using AND, OR, XOR( ), DECREMENT, HEX, HI( ), LOW( ) and RANDOM( ).
- Better documentation of the major macros ENTER, ENTERGROUP and REPORT, see BREAKINIT, BREAKPOINT$, ENTCLEAR, ENTFIND, ENTSFIND, ENTSAVE, ENTSKIP, ENTRESET and ENTUPDATE
- Loadable Binaries allow routines written in another language to be loaded into memory, called and unloaded by LOAD_BINARY, CALL_BINARY and UNLOAD_BINARY.
- Encryption of text using ENCRYPT.
- Temporary indexes, in-memory or on disk, multi-user safe and deleted when the file is closed.
- In-memory data tables, support all data operations including lightning fast re-indexing.
- Global, shared and private modules can be loaded and unloaded, communicate by EXPORTed variables and procedures.
- GET_SCREEN and SET_SCREEN for direct screen manipulation.
- Callbacks for ENTRY, ACCEPT on entry, per character and on exit.
- Callbacks for keyboard input allow total control and many advanced features.
- Callbacks for error handling allow total control and many advanced features.
- Optimised file constraints allow a filter or a logical sub-file to be defined, using CONSTRAIN, CONSTRAINT and REQUIRE.
- SET_TERMTYPE allows video mode or dimensions to be changed at runtime.
- Coercion functions IMAGE, FILE, WINDOW and FIELD for improved data manipulation capability.
Top of Page
Back to FAQ Page