FlagShip - The Compiler for Clipper code on UNIX ================================================ FlagShip is a compiler which fully compiles CA/Clipper code on Unix. It extends the CA/Clipper syntax and offers the benefits of compiled code in the multiuser, multitasking and network environment of Unix. It joins the best of two worlds, the Clipper language and the Unix oper- ating systems. Introduction ------------ What does a Clipper expert do, faced with a Unix machine? Where do Clipper applications stand in a booming Unix market? Neither do Clipper, dBASE or FoxBase/FoxPro programmers need to learn a new database system, nor do they need to throw their existing develop- ments away. FlagShip is there to make life easier. It is a compiler which fully compiles Clipper 5.2d back to '87, as well as other Xbase. Same Clipper code, same data, same look and feel. Just a more powerful and diverse operating system - Unix. Not only this, many worries and headaches of the DOS operating system simply disappear, memory limits for one. And a whole new world with extended FlagShip functionality opens up. Also for a Unix programmer: FlagShip speeds up the development of data- based application significantly. Ten lines of source code will produce hundred or more lines of bug-free "C" code. What is FlagShip ? ------------------ It is a native compiler which fully compiles Clipper code in the Unix environment. There is no p-code as in Clipper, and it is not an inter- preter as some other Xbase. As a native compiler, it takes advantage to optimize your code for speed and size. Regardless of the polymorphic variables of Clipper (no fixed type), where possible, it also check for conflicts and cor- rect types in expressions. The compiler also knows everything about the internal classes, objects and methods. At compile time, it also checks for their correct usage. These checks save the programmer development and testing time. Compiling --------- You can either develop in FlagShip, or port an existing Clipper application to Unix. Either way, .prg sources are required. To copy DOS sources to Unix, both FlagShip and Unix offer utilities to simply read in DOS diskettes, serially transfer your files, or use a network. The compilation takes place in several steps, all of which can be done automatically or as you choose: - the code is preprocessed, just as in Clipper, - then compiled into the K&R C language to maintain compatibility with all the systems, - with the Unix's own C compiler, (a part of every Unix) compiled to object code, - and linked with the FlagShip library into an executable. The produced executable runs just as it did on DOS, with the exactly same look and feel. It does not require any additional run-time modules or licenses and can be freely distributed. Although possible, overlays are not common in the Unix environment. The operating system takes care to manage the virtual memory for you and your application. You can link your complete application into one "big" executable, and let Unix do the rest. It will know when and which part to keep in memory, and which part to temporarily move out to disk. Even better. If many users are using the same application, only a single copy of the necessary parts of the executable will be maintained in memory. Only the data of the variables will be duplicated for each user. What more, the standard system and C libraries are not linked into the code at all. They are referenced dynamically during the execution of your application. This saves you also disk space and loading overhead. The application is not limited to the available memory. It can grow and grow if it needs. A freedom DOS will never have. A word of caution. The intermediately produced C code and objects cannot be linked alone without the FlagShip library. It provides the functionality of the FlagShip language. Compatibility ------------- The FlagShip compiler and language support - all the commands, functions (over 900 of them), and preprocessor directives of Clipper 5.2d, including - Locals, Statics, Publics, Privates, and multidimensional Arrays, - GET, TBrowse and Error classes, objects and methods, and the Error system API, - code blocks, - run-time macro evaluation, compiled or macro evaluated code blocks, and the Item API, - the General Terminal API, - the Replaceable Database Driver (RDD) API, - the File System API, and - the Extend C API. Unbelievable, you say. Yes, but quite true, with two exceptions due to differences between DOS and Unix - the RUN command, where Unix commands have different names and functionality, and - direct manipulation of the hardware and the screen, including the manipulation of screens saved to variable. These things have to be taken care of and changed in your source code. FlagShip extensions ------------------- If on Unix, why not use its power? Several extensions are built into FlagShip to - simplify porting DOS applications, - speed up applications, - define unusual terminals, - spool printer output, - link to other applications, - easily nationalize the application, - take advantage of the Unix system utilities. Porting ------- For your DOS program, the main difference between DOS and Unix is in the file name convention. DOS doesn't care if you use capital letters, lower case, or both for you file names. Neither did probably you in your program. Unix does, but FlagShip takes care about that. A set of global switches are available to tell the File System API in which "standard" form do the file names actually appear in your directory. The API will know during run time how to convert the file name in order to find the requested file. Should it capitalize, change to lower case, how to translate the extension, and in which path to look for the corresponding letter. Unix namely handles drives as paths in the file system. FS_SET("lowerfiles", .T.) FS_SET("pathlower", .T.) FS_SET("translext",".ntx", ".idx") All you have to do is put a few function calls in you start up module. Or use a single #include statement. #ifdef FlagShip # include "fspreset.fh" #endif Speed up -------- The compiler supports all the common variables types and declarators. Nothing new you'll say. To speed up your application, you can give the variables a fixed type. This is new, and will be used in the CA/VO for Clipper too. It is often in your program that you will use a variable for one purpose only. Why not declare it with the correct type. This dram- atically (hundred-fold) increases speed, allows the compiler to even check more at compile time, and improves your code readability. A shift to a better technology. All this with a simple LOCAL var_name AS type STATIC var_name AS type GLOBAL var_name AS type GLOBAL_EXT var_name AS type The types can take any of the common C language simple types. The variables are used with no difference in the program. Terminal support ---------------- Unix allows effortlessly connecting terminals via serial lines or network. FlagShip supports all the common terminal brands through supplied description files. But it also allows you to define your own specific terminal, or change your preferences with regard to function keys or colors. What makes this task easy is using the usual Unix curses package. This is a terminal independent interface. The user can supply the terminal definitions as source files. Thats all it takes. Printer spooling ---------------- On DOS you are used to directly printing to the printer port. On Unix, where many users use the machine resources simultaneously, this would cause scrambled outputs. One printout stepping on the other. FlagShip allows the direct use of devices (equivalent to DOS ports), but encourages using the spooler. For this purpose, it has facilities to manage unique spooler file names. This and the Unix spooler make the task easy as a pie for you. Link to other applications -------------------------- What do you with your existing C code, or other applications? The FlagShip Open C API and the Inline C API allow you to easily access C functions. Not only this, via C inline, you can add mission critical code directly into your .prg. Access to ESQL included. Exchanging data between C and your .prg variables is in a simple and natural way supported. STATIC pi := 3.14 && supports standard Clipper var types LOCAL myvar AS double && but also typed variables ... myvar = pi / 6.0 #Cinline myvar = sin(myvar); /* access to std. C lib */ #endCinline ? myvar // prints 0.50 For passing data to outside applications, pipes from all the output redirects, e.g SET PRINTER TO, to other Unix applications are available by e.g. SET DEVICE PIPE TO other_terminal SET ALTERNATE PIPE TO filter_app The piped to applications will run simultaneously with your application in a multitasking fashion. Nationalization --------------- What do you do with my Italian, German, Spanish or for that matter Korean application? FlagShip supplies source files with tables for - Keyboard layouts, - screen character mapping, - index sorting order, - string comparisons, and - messages out of FlagShip functions. Keyboard and screen mappings are available for the common european languages. Koreanisation has also been done. The index sorting order is stored into each FlagShip index file during creation, and retrieved from when attaching the index. Selecting a languages is a matter of a function call in your application. So is using multiple languages within. For a new language, you just need to edit a table file, or two. FS_SET("loadlang", 1, "MySpanTab") FS_SET("loadlang", 2, "MyPortugTab") FS_SET("setlang" , 1) Again, no headaches involved. Access to Unix -------------- All the Unix library functions can be easily accessed by the CALL command, too. You have the versatility and the power to do that. CALL chdir WITH "/my/new/dir" Inline C in your .prg code is also nothing strange for FlagShip. Via the RUN command you can access the Unix utilities. What more, you can also spawn in the background any number of tasks. These will run simultaneously with your application and do your less time critical jobs. RUN mail &user < order.txt & Multiuser, Multitasking, Networking ----------------------------------- Can you imagine, say from Singapore, using your application running on a machine in San Francisco or Munich? Or let 20 book-keepers use one single machine and the absolutely same program and data on a single machine? FlagShip with Unix does it. And you don't have to change your code. Locking and database usage works as it did on DOS with a network. Just that you can use one and the same machine. Or have the machines connected with a LAN. Or even a WAN or modem! rsh -l mylogin germachin.de BookKeeping runs BookKeeping under "mylogin" on the "germachine" in Germany from all around the world with an internet connection. The access to applications via modem is also nothing new to Unix. And you don't need a machine for each work place. A simple terminal suffices. The FlagShip look and feel -------------------------- How can a terminal display my application screens? What do I do with my function keys? Whatever the terminal can do, FlagShip will use to make your application's output look exactly as it is expected to. Colors, character based graphics, national characters, and extended keyboard. Be it an X terminal, or a terminal in X. Be it a graphic card in your machine. Be it a terminal emulator on your DOS. Be it a dumb terminal. For the dumb terminals, FlagShip will fill in, where the terminal fails. But your application will still work. You will clearly recognize your screens. You have the look and feel you expect and are used to. Why FlagShip ? Why Unix ? --------------------------- If all the above is not enough, here is some more... FlagShip runs on Unix and opens the world of Unix for you. You can move your application to it, and use all its benefits. Your memory is not limited. Your application size neither. But these are only commodities. You have a multitasking, multiuser system. You don't need a network, or many machines to have many users running your programs. Just simple terminals. But you can also connect remotely from networks or via modem. The security is also inherently there. Your user has to log in before even accessing your application. Not to talk about maintenance. Simple back-ups. Only one version of your program to maintain on one machine, instead of perhaps hundreds of them. All this at a portion of the price you would need to build up your DOS network. Unix is already the industry standard. There is no machine on the market which doesn't run Unix. And an error that a user or your application might make, will not and cannot crash your system. Neither can you lose your data just like that. The FlagShip package -------------------- FlagShip is not only the compiler and the library. It comes with utilities for - simplifying your porting task, - copying your code and data over to Unix, - debugging, and - defining an testing your terminal. It comes with nationalization tables, an on-line and a written manual with over 1200 pages. Everything to make your move to FlagShip as easy as it gets. Developing with FlagShip ------------------------ If you see FlagShip as a porting tool only, you are very mistaken. FlagShip has its own language, and a development system. That it overtook Clipper's definition of Xbase and is compatible to it is only to your advantage. Unix has advanced utilities for maintaining source code versions (sccs), doing make files, and managing your development. For debugging, FlagShip offers a line oriented debugger with the complete functionality for source code debugging. Unix comes with several low level debuggers also. You don't lack on a development environment. And via the automatically defined "FlagShip" define and variable similar to Clipper's PUBLIC CLIPPER, you can maintain a single set of sources for your Unix and DOS environment. For Clipper 5.x #ifdef FlagShip RUN ls -l *.* #else RUN DIR *.* #endif or for Clipper '87, dBase, Fox compatibility PUBLIC FLAGSHIP, CLIPPER if FLAGSHIP ? "FlagShip application" elseif CLIPPER ? "Clipper application" else ? "PC application" endif Your sources remain DOS and Unix compatible and portable, which means a "common source and data for Unix and DOS". Invoking FlagShip ----------------- To compile with FlagShip, you don't need .clp file. Nor do you need to worry yourself which linker to use, or how to link. FlagShip myapp.prg xyz*.prg -omyapp -Mstart will compile myapp.prg, together with all the xyz*.prg and dependant modules, link the application, name it myapp. It is similar to the DOS invocation of CLIPPER myapp CLIPPER @xyz.clp RTLINK FI myapp, xyz OUT myapp Your application will also be so prepared to begin executing from your "start" procedure or function, common in CA/VO. FlagShip meets Clipper ---------------------- Where do you hit the limits? What do you gain? Most of the answers have already been given in this text. You may find some more in the table below. +----------------------------------------+---------------+------------+ | Capability | FlagShip/Unix | Clipper/DOS| +----------------------------------------+---------------+------------+ | Number of public & private variables | Unlimited | 2048 | | Fixed type variables | Yes | No | | Statics and Locals | Yes | Yes | | Multidimensional arrays, per dimension | 65536 | 4096 | | Inline C and Open C API | Yes | No | | Extend C API | Yes | Yes | | Produces C code, native objects | Yes | No | | Supports serial and X terminals | Yes | No | | Application executable via modem | Yes | No | | National language support | Yes | Yes | | User definable nationalization | Yes | No | | Automatic virtual memory | Yes | No | | Maximum executable size/virtual memory | 2 GByte | 640 kByte | | Simultaneously open files | up to 6000 | 250 | | Supported operating systems & machines | over 50 Unix | DOS | | Multiuser on same machine | Yes | No | | Sieve benchmark - 200 iterations | 0.2 second | 6 seconds | +----------------------------------------+---------------+------------+ FlagShip's extensions to Clipper capabilities Add-on products --------------- Third party vendors are already at work. They are porting and adapting to FlagShip. Or are just about to do so. But if you own any 3rd party library in source code - no problem, just recompile it with FlagShip. mutisoft too has done its homework. The FS2 toolbox is functionally and call compatible to CA3/NT2. Windowing, string or numeric manip- ulation, serial communication, and much more is among its func- tionality. Severeal RDDs are also planned, especially for Informix, Oracle and SQL database engines as well as to support .cdx, .ntx and other index and locking mechanism in heterogenal network. The Future with FlagShip ------------------------ Looks bright. Lots is cooking in the multisoft kitchen - a complete graphical environment based on X/windows, - replaceable database drivers for the majority of the known file formats, including also the locking mechanisms, - binding to SQL systems, - transaction processing, and - VO compatibility. FlagShip is going X. With FoxPro commands for ease of use. With Clipper 5.3 compatibility. With VO objects and enhancements. To stay the most complete Xbase on the market. Simultaneous use from heterogeneous operating systems and database environments is our goal with the RDDs. Binding with SQL, and also the use of same data from DOS and Unix at the same time. Let the programmer make his application without worrying about low level details. Transaction processing will make our database system still more robust. And brings compatibility to dBase IV on the way. FlagShip's path for the future is clear. And there is no obstacle to stop it. Conclusion ---------- FlagShip is your only choice for your next step to Unix. Why? You have an environment you are familiar to, and the power you hadn't imagined is possible. All this right away. You don't need to learn new languages, nor reprogram you old applications. And you can improve as you proceed. FlagShip is offering just that. Millions of well trained Clipper, dBASE and Fox programmes are familiar also with FlagShip. The industry strength compiler combined with the industry standard operating system. Both are forerunners. Both are following the shift of technology. And both offer what the new world of computing likes to see. And don't forget, maturity is the key. Both Clipper and Unix have proven themselves throughout the years. Their user base, the palette of machines, and the applications developed are the witnesses. A big international family. And the price for such a freedom ? ---------------------------------- You will be surprised ! Call or write, we cannot mention it here. We support ALL major Unix systems. For further information, contact: multisoft Datentechnik GmbH P.O.B. 312 D-82027 Gruenwald/Muenchen Germany Telephone : ++49-89-6417904 (9-19 CET = 8-18 GMT) Fax : ++49-89-6412974 (24 hr) Compuserve: 100031,267 (24 hr) Internet : 100031.267@compuserve.com (24 hr) We will be happy to tell you the contact address of your nearest LOCAL FlagShip distributor WORLDWIDE, including U.S.A, Canada, Central and South America, Asia, Africa and Europe. * * * * * * FlagShip is trademark of multisoft Datentechnik GmbH. Other trademarks or registered trademarks: Unix of USL, Clipper of Computer Associates, dBASE of Borland, Foxbase of Microsoft. Other products named herein may be trademarks of their respective manufacturers. + + + + + + A trial/demo version of FlagShip is available on several BBS and forums, e.g. CompuServe and Internet. Look for FSINDX.TXT (or FSDEMO.DOC and FS4*.GZ) files or browse for the keyword "FlagShip".