⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rhl36.htm

📁 linux的初学电子书
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<HTML>

<HEAD>

<TITLE>Red Hat Linux Unleashed rhl36.htm </TITLE>

<LINK REL="ToC" HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm">

<LINK REL="Index" HREF="htindex.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/htindex.htm">

<LINK REL="Next" HREF="rhl37.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl37.htm">

<LINK REL="Previous" HREF="rhl35.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl35.htm"></HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">

<A NAME="I0"></A>

<H2>Red Hat Linux Unleashed rhl36.htm</H2>

<P ALIGN=LEFT>

<A HREF="rhl35.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl35.htm" TARGET="_self"><IMG SRC="purprev.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>

<A HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm" TARGET="_self"><IMG SRC="purtoc.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purtoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>

<A HREF="rhl37.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl37.htm" TARGET="_self"><IMG SRC="purnext.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purnext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>


<HR ALIGN=CENTER>

<P>

<UL>

<UL>

<UL>

<LI>

<A HREF="#E68E313" >What Is XBASE?</A>

<LI>

<A HREF="#E68E314" >FlagShip</A>

<LI>

<A HREF="#E68E315" >dbMAN</A>

<LI>

<A HREF="#E68E316" >LINCKS</A>

<LI>

<A HREF="#E68E317" >Other Database Products</A>

<LI>

<A HREF="#E68E318" >Summary</A></UL></UL></UL>

<HR ALIGN=CENTER>

<A NAME="E66E36"></A>

<H1 ALIGN=CENTER>

<CENTER>

<FONT SIZE=6 COLOR="#FF0000"><B>36</B></FONT></CENTER></H1>

<BR>

<A NAME="E67E36"></A>

<H2 ALIGN=CENTER>

<CENTER>

<FONT SIZE=6 COLOR="#FF0000"><B>Database Products for Linux</B></FONT></CENTER></H2>

<BR>

<P>This chapter covers some common database applications for Linux. The two applications we focus on in this chapter are FlagShip and dbMAN V. We also briefly cover LINCKS, a free, object-oriented database management system (DBMS).

<BR>

<BR>

<A NAME="E68E313"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>What Is XBASE?</B></FONT></CENTER></H3>

<BR>

<P>XBASE is a generic term for implementations of what was originally the dBASE programming language. The main players in the MS-DOS version of this database are FoxPro (now owned by Microsoft), dBASE V (now owned by Borland), and Clipper (owned by 
Computer Associates).

<BR>

<P>XBASE is a language that has statements normally found in programming languages, such as IF, ELSE, ENDIF, and WHILE. The programming language structure is designed for accessing records in databases and not for general purpose programming. For example, 
the GOTO statement in XBASE refers to a record in a database, not a location in the program code. XBASE has some powerful statements for processing files and getting data from forms and screens.

<BR>

<P>In addition, setting up relations between files is easy to do with XBASE. The names of all fields in a file, and their types and lengths, are recorded in the file header. New fields can be added to a file without changing programs that use the file. The 
scheme allows for having different, disjointed programs all accessing the database file in their own way and all using the fields in the header.

<BR>

<P>The three major manufacturers of databases have largely ignored Linux as a platform for their products. What we have instead for Linux are products called FlagShip (by WorkGroup Solutions) and dbMAN (from Versasoft Corporation). Both of these products 
run on several implementations of UNIX. dbMAN also runs on MS-DOS.

<BR>

<P>Comparing the two products is like comparing apples and oranges. FlagShip is patterned after Clipper Version 5. The dbMAN package resembles dBASE III+ or FoxPlus. FlagShip, like Clipper, is a compiler. dbMAN is primarily an interpreter, although it is 
possible to &quot;compile&quot; dbMAN programs.

<BR>

<P>FlagShip is also an object-oriented language, which makes it philosophically different from dbMAN, as well as from FoxPro and dBASE. Clipper and FlagShip have several C-like features. Actually, the resemblance is a plus for Linux users.

<BR>

<P>The target markets of the two are also different. dbMAN is targeted primarily at individual users. If you want a program you can run on your desk to keep track of time billed to clients or that maintains a phone list of customers or your sales record, 
dbMAN can do the job.

<BR>

<P>By contrast, FlagShip might be overkill for simple database operations such as mailing or customer tracking lists, in other words, the casual user, not programmer. This is not to say that you cannot use it for simple applications, but you may have to 
learn a bit of programming to really use FlagShip's wonderful and powerful features. FlagShip is more realistically aimed at people who want to develop or port software packages. Traditionally, dBASE files always have separate data (.DBF) and index files. 
The format of data files is pretty much uniform for all XBASEs. It is hard to find two products that use the same index file formats. I was able to use the same .DBF files with FlagShip and dbMAN.

<BR>

<BR>

<A NAME="E68E314"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>FlagShip</B></FONT></CENTER></H3>

<BR>

<P>FlagShip is available from Red Hat (<A HREF="tppmsgs/msgs1.htm#101" tppabs="http://www.redhat.com/acc/product-pages">http://www.redhat.com/acc/product-pages</A>) and WorkGroup Solutions. Download an evaluation version from WGS at <A 
HREF="tppmsgs/msgs1.htm#102" tppabs="ftp://ftp.wgs.com/pub2/wgs">ftp://ftp.wgs.com/pub2/wgs</A> (see <A HREF="tppmsgs/msgs1.htm#103" tppabs="http://www.wgs.com/fsdemo.html">http://www.wgs.com/fsdemo.html</A> for instructions), or see <A HREF="tppmsgs/msgs1.htm#104" tppabs="http://www.wgs.com/flagship.html">http://www.wgs.com/flagship.html</A> for 
more information.

<BR>

<P>FlagShip is a compiler. It translates the XBASE code into C. The generated code can be linked with the gcc compiler. This means that you can link functions written in C or assembler into FlagShip programs. You can even mix XBASE and C code in a program. 
The compiled binaries may be distributed without paying royalties to MultiSoft.

<BR>

<P>FlagShip has no equivalent of the &quot;dot prompt&quot; or interactive command interface found in other XBASE products. However, there is a public-domain program in their WorkGroup Solutions's FTP area named dbu. This program will provide the 
capability to create files and indexes, add, change, or locate records, and browse files.

<BR>

<P>The FlagShip feature has an online reference program called fsman. The fsman contains the entire FlagShip manual&#151;more than 1,000 pages worth of material. This means that you do not have thick manuals all over your desk. The samples can be saved as 
text files on disk. This makes it easy to incorporate programming examples in the manual into whatever program you are working on at the time. Of course, you could also use the mouse to copy text from fsman into your program by cutting and pasting between 
windows.

<BR>

<P>FlagShip uses the curses toolkit for its user interface. During installation, you get a set of terminfo files specifically for FlagShip. Because of a problem with ncurses 1.8.5, they are compiled with ncurses 1.8.1.

<BR>

<P>FlagShip doesn't have a function specifically for managing pull-down menus. What FlagShip and Clipper programmers normally do is use @PROMPT/MENU TO statements to create the horizontal menu, and use a function called ACHOICE() for the vertical menus.

<BR>

<P>FlagShip has functions for managing windows that work very nicely, but the functions are not part of the basic package. You have to buy the FStools library. As the name suggests, the FStools library is a clone of the Clipper Tools library. There are 
also windowing functions in the NanForum library (containing mathematical and statistics functions), which is public domain.

<BR>

<P>You can set hot keys with the statement SET KEY keyid TO statement. Normally, the statement would be a function invocation. Within this function, you can call the function READVAR() to find out which field the cursor was in when the key was pressed. An 
input field can be validated by adding the VALID statement parameter to the @SAY/GET statement. Again, the statement would normally be a function invocation. Within the function, the value the user typed in could be looked up in a database file.

<BR>

<P>To determine how compatible FlagShip is with Clipper, I downloaded a couple of programs from a local BBS. I ran into two problems. The programs contained function calls that looked like this:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">IF (expr, true_result,)</FONT></PRE>

<P>FlagShip complained about the absence of the third parameter. Adding .f. for the third parameter solved the problem. The other problem was a reference to a function named FT_Shadow(), which FlagShip simply doesn't know about. Get rid of this problem by 
commenting it out.

<BR>

<P>A key feature of FlagShip is the TBROWSE() object. You use this in place of the BROWSE command that exists in other languages. If you don't have any previous experience with object-oriented programming, setting up TBROWSE() for the first time is not 
easy. The best course of action is to use the examples and samples in the fsman pages.

<BR>

<P>When running a FlagShip program in an xterm, you may get hieroglyphics instead of line drawing characters. Fiddling with the acsc parameter in the fslinxterm terminfo entry may not help. Try using the vga font that comes with DOSemu package. See <A 
HREF="rhl57.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl57.htm">Chapter 57</A>, &quot;DOSemu,&quot; for more information. Instead of using the acsc parameter, FlagShip uses another file named Fschrmap.def which maps the character codes generated by the program to the character codes displayed on the 
screen. Using the vga font is actually a better solution because it's possible to display double line drawing characters.

<BR>

<P>FlagShip is picky about reserved words. If you have a filename such as browse, you are liable to run into problems running programs. Keep a list of all the reserved words in FlagShip and avoid using these as file or program names. Check the list of 
reserved words in the fsman pages.

<BR>

<P>FlagShip programs could be attached to WWW pages. This makes it possible for net surfers to access and update databases. This feature, plus the ability to link in your C and C++ programs, makes FlagShip a very powerful data management tool.

<BR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -