Professional Documents
Culture Documents
12. Debugging is the routine process of locating and removing computer program
bugs, errors or abnormalities, which is methodically handled by software
programmers via debugging tools. Debugging checks, detects and corrects
errors or bugs to allow proper program operation according to set specifications.
Debugging is also known as debug.
13. What is memory variable in
foxpro?
The same as in other programming languages. A place to
store a value. A variable may be of different types,
including logical, string, numeric, or date.
x=5
Rushmore is a data access technique that permits sets of records to be accessed very efficiently. Rushmore
query optimization uses indexes efficiently to quickly find a set of records. It is used on queries that involve
restrictions on multiple-indexed fields. Rushmore is an exclusive technology for rapidly selecting sets of
records from tables. It can reduce query response times from hours or minutes to seconds.
The legendary data access performance in FoxPro stems from its Rushmore query optimization and use of
fixed length storage of data. Rushmore creates bit-mapped indexes that allow the engine to very quickly
determine whether each row in a table meets a criteria and should therefore be included in a query's result
set. Fixed width storage of data ensures that a field will be in the same location from row to row, making that
field easier to locate.
Starting with the Rushmore query technology in the Visual FoxPro 2.0 release, FoxPro's primary attraction
has been its fast data engine. It doesn't seem to have lost that edge over the years: posted reports on the
newsgroups claim the new release of Visual FoxPro is twice as fast as SQL Server, for 50 users or less
Understanding Rushmore Technology
Rushmore technology is a data access technique that uses standard Visual FoxPro indexes to optimize
access to data. You can use Rushmore with any Visual FoxPro index, including FoxPro 1.x (.idx) indexes,
compact (.idx) indexes, and compound (.cdx) indexes.
Both .cdx and compact .idx indexes use a compression technique that produces indexes as small as one-
sixth the size of uncompressed old-format indexes. Visual FoxPro can process a compressed index faster
because it requires less disk access, and because more of the index can be buffered in memory. Although
Rushmore, like other file access techniques, benefits from the smaller size of compact indexes, it also
functions very well with indexes in older formats.
When Visual FoxPro processes very large tables on computers with only the minimum amount of RAM,
Rushmore might not find sufficient memory to operate. In that case, Visual FoxPro might display a warning
message (“Not enough memory for optimization”). Although your program will function correctly and without
losing any data, the query will not benefit from Rushmore optimization.
In its simplest form, Rushmore speeds the performance of single-table commands using FOR clauses that
specify sets of records in terms of existing indexes. Also, Rushmore can speed the operation of certain
commands such as LOCATE and INDEX.
Visual FoxPro SQL commands use Rushmore as a basic tool in multi-table query optimization, using
existing indexes and even creating new ad-hoc indexes to speed queries. .
17. Not
18. Structured Query Language (SQL) is a standard computer language for relational
database management and data manipulation. SQL is used to query, insert, update and
modify data. Most relational databases support SQL, which is an added benefit for
database administrators (DBAs), as they are often required to support databases across
several different platforms.
These SQL commands are mainly categorized into four categories as discussed below:
1. DDL(Data Definition Language) : DDL or Data Definition Language actually consists of
the SQL commands that can be used to define the database schema. It simply deals with
descriptions of the database schema and is used to create and modify the structure of
database objects in database.
Examples of DDL commands:
CREATE – is used to create the database or its objects (like table, index,
function, views, store procedure and triggers).
DROP – is used to delete objects from the database.
ALTER-is used to alter the structure of the database.
TRUNCATE–is used to remove all records from a table, including all spaces
allocated for the records are removed.
COMMENT –is used to add comments to the data dictionary.
RENAME –is used to rename an object existing in the database.
2. DML(Data Manipulation Language) : The SQL commands that deals with the
manipulation of data present in database belong to DML or Data Manipulation Language
and this includes most of the SQL statements.
Examples of DML:
SELECT – is used to retrieve data from the a database.
INSERT – is used to insert data into a table.
UPDATE – is used to update existing data within a table.
DELETE – is used to delete records from a database table.
19. Flowcharts are used in designing and documenting simple processes or programs. Like
other types of diagrams, they help visualize what is going on and thereby help understand a
process, and perhaps also find less-obvious features within the process, like flaws
and bottlenecks. There are different types of flowcharts: each type has its own set of boxes
and notations. The two most common types of boxes in a flowchart are:
Start/End Symbol
The terminator symbol marks the starting or ending point of the system. It usually
contains the word "Start" or "End."
Document Symbol
A printed document or report.
Input/Output Symbol
Represents material or information entering or leaving the system, such as
customer order (input) or a product (output).
Preparation Symbol
Represents a set-up to another step in the process.
Connector Symbol
Indicates that the flow continues where a matching symbol (containing the same
letter) has been placed.
Or Symbol
Indicates that the process flow continues in more than two branches.
Merge Symbol
Indicates a step where two or more sub-lists or sub-processes become one.
Collate Symbol
Indicates a step that orders information into a standard format.
Sort Symbol
Indicates a step that organizes a list of items into a sequence or sets based on
some pre-determined criteria.
Subroutine Symbol
Indicates a sequence of actions that perform a specific task embedded within a
larger process. This sequence of actions could be described in more detail on a
separate flowchart.
Delay Symbol
Indicates a delay in the process.
Data Storage or Stored Data Symbol
Indicates a step where data gets stored.
Database Symbol
Indicates a list of information with a standard structure that allows for searching
and sorting.
Display Symbol
Indicates a step that displays information.
Off Page
Indicates that the process continues off page.
20. not
You can also start wizards from the Tools menu by clicking Wizards
and selecting a wizard. After you create a layout using a wizard, you
customize the layout using the Report Designer.
Creating Reports Using Quick Report
You can create reports quickly by using Quick Report, which creates
a simple report from a single table.
Tip:
You can use Quick Report in existing report files if the Detail band is empty. If the Page Header band
contains controls, Quick Report saves them.
Note:
Quick Report does not add General fields to the report layout.
The Report Designer opens.
You can also start a quick report from the File menu by clicking New
and in the New dialog box, click Report and then New File. The
Report Designer appears. To continue, follow the remaining steps
described for creating a quick report.
The Report Designer and Label Designer are similar in functionality but differ in the default page and
paper they use.
The Report Designer opens
22. Not
23. Arithmetic Operations and Functions
Operations
In FORTRAN, addition and subtraction are denoted by the usual plus (+) and minus
(-) signs. Multiplication is denoted by an asterisk (*). This symbol must be used to
denote every multiplication; thus to multiply N by 2, we must use 2 * N or N *
2 not 2N. Division is denoted by a slash (/), and exponentiation is denoted by a pair of
asterisks (**).
Operator Operation
/ division
** exponentiation
Real Arithmetic
Providing all variables and constants in the expression are real, real arithmetic will be
carried out as expected, with no decimal places being truncated.
Integer Arithmetic
Providing the expression has all integers, subtraction, addition, multiplication and
exponentiation will prove no problem. However integer division is somewhat
different than normal division with real values. Integer division ignores the fractional
part. Any decimal places are truncated.
Example
Mixed mode arithmetic is when an expression contains both reals and integers. If
ANY of the operands are real then result of the operation will be real. However,
mixed mode arithmetic should be used with extreme care. You may think you have a
real operand when in reality you have two integer operands.
Example
5/2*
is 6.0 Incorrect because the order of operation is left to right. 5/2 = 2 then 2 * 3.0 = 6.0
3.0
3.0 * 5 / is 7.5 Correct because of mixed mode arithmetic 3.0 * 5 = 15.0 then 15.0/2 = 7.5(TAKWE
2 EXAMPLE FROM BOOK PAGE NO.107)
This step-by-step article describes how to use Mathematical functions, Type Conversion
functions, and String functions that are defined in Visual Basic .NET or Visual Basic 2005.
back to the top
The functions that are used for mathematical calculations are defined in
the System.Math class. The Mathclass includes trigonometric functions, logarithmic
functions, and other common mathematical functions. The following functions are the
functions that are defined in the Math class of the System namespace.
Note To use these functions, import the System.Math namespace to your project by adding
the following code to the top of the source code:
Imports System.Math
Abs
Abs example:
The Atan function returns a Double value that contains the angle. The tangent of the angle
is the specified number. A positive return value represents a counter-clockwise angle from
the x-axis. A negative return value represents a clockwise angle. Multiply the return value by
180 divided by pi (π) to convert from radians to degrees.
Atan example:
The Cos function takes an angle in radians as an argument and then returns a Double value
that is the cosine of the specified angle.
Cos example:
Exp example:
The Log function returns a Double value that contains the logarithm of a specified number.
This method is overloaded and can return either the natural (base e) logarithm of a specified
number or the logarithm of a specified number in a specified base.
Log example:
This example uses the Log method of the Math class to return the natural logarithm of a
number.
The Round function returns a Double value that contains the number that is nearest the
specified value. Additional Round functions are available as methods of the intrinsic types
such as the Decimal.Roundmethod.
Round example:
The Sign function returns an integer value that indicates the sign of a number. The following
table shows the input arguments of the function and of the return values:
Positive 1
Negative -1
Zero 0
Sign example:
This example uses the Sign method of the
Math class to determine the sign of a number.
The Sin function takes an angle in radians as an argument and then returns a Double value
that specifies the sine of the angle.
Sin example:
The Sqrt function returns a Double value that specifies the square root of the specified
number.
Sqrt example:
The Tan function returns a Double value that contains the tangent of the specified angle.
The Tan function takes an angle that is measured in radians as the argument. When the
angle that is specified is NaN, NegativeInfinity, or PositiveInfinity, this method returns NaN.
Tan example: