Sie sind auf Seite 1von 3

7/20/12

Input and Output Statements in Foxpro | Live to Learn!


C reate new ac c ount
Reques t new pas s word

Log in

Live to Learn!
Everything is Possible

HOME

TUTORIALS

Ads by Google

PPTS

FORUM

Visual FoxPro

BLOG

CONTACT

MS Visual FoxPro

FoxPro

Of Visual FoxPro

You are he re : Hom e Fox pro Program m ing

Input and Output Statements in Foxpro


Develop Web Apps Fast 30 times faster than other tools No HTML, C SS, JavaScript, AJAX, PHP www.re alsoftware .com /we b
Visual FoxPro 10 C ross platform Visual FoxPro for Windows/OS X/Linux/C loud/Mobile www.lianja.com
LCDs, Character, Graphic Liquid C haracter Displays,inverters High quality, lowest prices on line www.us-e le ctronics.com

Submitted by admin on 28 September, 2009 - 16:46

Input and output in foxpro


0
As we already know that data can be entered into tables through the
APPEND/BROWSE commands. Data entry for tables can also be done through programs. There
arises a need to display and accept information in a formatted way.
The @say command is used to place data at a particular screen location and to display data stored in
fields or memory variables. The @get commands is used to retrieve data.
Displaying data
@say command: Syntax: @<Row, columns>SAY<expr>
[Function<exprC1>]
[Picture<expr2>]
[size<exprn],<exprn2>]
[font<exprC3>[,<exprN3]]
[STYLE, exprC4>]
Example:@2, 10 say hello welcome to FoxPro
Syntax:
Input
@row,column | say <char_exp> get <mem_var>
Output
@row ,column | say <char_exp> get <mem_var>
Clear
@row, column to row, column clear
Clear all
Ex
@5, 5 clear to 20, 20

FEAT URED BLOG


POST S
Best way to Use
Rupee Symbol in
Windows Easy
steps
Read Tamil News
papers on your
Mobile
C reating All in One
Windows XP DVD
with all Important
Applications
Integrate Office 2007
/ Office 2010 with
Windows
Unlimitted Free SMS
Software
C reate integrated
windows XP C D /
DVD
University Results
2012 - Email / SMS
Alerts
C reate integrated XP
using nLite
Input Indian
Languages Anywhere
C heck status of
receiver mobile
before sending sms
more

Box Command
@row1, column1 to row2, column 2
Picture clause
PICTURE clause is used to control of display or the information to be accepted.
@..SAY...GETS PICTURE CODES:
A
Allows only alphabets
9
Allows only digits, signs for numeric data
N
Allows Letters and Digits
#
Allows Only Digits, Blanks and Signs
X
Allows any Character

www.livetolearn.in/site/programming/foxpro/input-and-output-statements-foxpro

NEW FORUM
T OPICS
Networking FAQ
What is the difference
between XML, XSL,
XSD?
How to reset mysql
privillages and root
password
Difference between
C loud C omputing and

1/3

7/20/12

Input and Output Statements in Foxpro | Live to Learn!


L
Allows any Logical Data T, t, F, f, Y, y, N, n
Y
Allows Only Y, y, N, n
!
Converts letters into uppercase.
*
Displays asterisk in place of leading zeros.
,
Display the comma
.
Display the decimal Point.
Function Clause
You can include the function clause, the picture clause or both to control how<expr> is displayed or printed. A
function clause affects the entire expression. It contains only the following function code.
Function code & Purpose
B Left justifies numeric data within the display region.
Example:
Clear
Store 2750 to num
@5,20 say num
@6,20 say num function B
C Cr is displayed after a positive number to indicate a credit. Can be used with numeric data only.
Example:Clear
Store 15432.00 to amt
@5,20 say amt
@6,20 say amt function c
D Uses the current set DATE format.
Example:Clear
Store 230801 to num
Store foxproprograming to tit
@5,20 say num function D
@6,20 say tit function D
E Edits date type data as British date
Example:Clear
Store 230904 to num
@6,20 say num function E
T Trim leading and trailing blanks from<expr>
Example:Clear
@5,20 fox to tit
@6,20 say tit function T
X DB is displayed after negative numbers to indicate a debit. used only with numberic data.
Example:Clear
Store -15432.00 to amt
@5,20 say amt
@6,20 say amt function X

Grid C omputing
Difference between
Image and
Picturebox in VB
More

Z <expr> is displayed as all blanks if its numeric


value is 0. used only with numeric data.
Example:
Clear
Store o to amt
@5,20 say amt
@6,20 say amt function z
( Encloses negative numbers in parentheses. Used only with numeric data.
Example:Clear
Store 755 to amt
@5,20 say amt
@6,20 say amt function (
! Converts alphabetic characters to upper-case used with character data-only
Example:Clear
Store foxpro programming to tit
@6,20 say tit function !
^ Displays numeric data using scientific notation. Used with numeric data only.
Example:Clear
Store 75815 to amt

www.livetolearn.in/site/programming/foxpro/input-and-output-statements-foxpro

2/3

7/20/12

Input and Output Statements in Foxpro | Live to Learn!


@6,20 say amt function ^
$
Displays data in currently format. the currency symbol appears before or after the field value depending on the
current setting of set currency. used with numeric data only.
Example:Clear
Store 75815 to amt
@6,20 say amt function $
Picture expression can include the following characters:X Allows any character.
Y Allows logical Y, y, N and n only. Converts y and n to Y and N, respectively.
! Displays the current currency symbol specified by set currency. By default, the symbol is placed immediately
before or after the field.
* Asterisks are displayed in front of the numeric value. Use with a dollar sign $ for check protection.
. A decimal point specifies the decimal point position.
, A comma is used to specifies digits to the left of the decimal point.
Like

Sign Up to see w hat your friends like.

Creating a Program

up

Control Structures in Foxpro

Log in or register to post comments

Excel 2003
Your Favorite Office Programs Are. Now Available Anytime, Anywhere.
microsoft.com/free-trial-office365

Like

1 person liked this.


Login

Add New Comment


Type your comment here.

Showing 0 comments

Sort by oldest first

M Subscribe by email S RSS


Trackback URL http://disqus.com/forums/livetolearn/input_and_output_statements_in_foxpro/trackback/

www.livetolearn.in/site/programming/foxpro/input-and-output-statements-foxpro

3/3

Das könnte Ihnen auch gefallen