Function in FoxPro with Example
Function in FoxPro with Example
Function in FoxPro with Example
FoxPro में कई अलग- अलग Functions का उपयोग किया जाता है
यह Functions दिए गए Function क आधार पर Value वापस (Return) करते हैं
Date Functions in foxPro
DATE () – यह Function Computer System की वर्तमान (Current) Date वापस करता है
Ex – ?Date ( )
Output – 24/12/2024
DAY () – यह Function दी गयी Date से Day (दिन) को वापस करता है
Ex – ?Day (Date( ) )
Output – 2
DOW () – यह Function दी गई Date से Day of Week (सप्ताह के दिन) को वापस करता है
Ex – ?DOW (Date( ) )
Output – 3
CDOW () – यह Function दी गई Date से Day of Week (सप्ताह के दिन) को Character में वापस करता है
Ex – ?DOW (Date( ) )
Output – Tuesday
MONTH () – यह Function दी गई Date से Month को Number में वापस करता है
Ex – ?Month (Date( ) )
Output – 12
CMONTH () – यह Function दी गई Date से Month को Character में वापस करता है
Ex – ?CMonth (Date( ) )
Output – December
YEAR () – यह Function दी गई Date से Year को वापस करता है
Ex – ?Year (Date( ) )
Output – 2024 या 24
TIME () – यह Function Computer System की वर्तमान (Current) Time वापस करता है
Ex – ?Time ( )
Output – 03:10:45
TEXT या CHARACTER FUNCTIONS in FoxPro
LEN () – यह Function दिए गए Text या Character की Length को वापस करता है
Ex – ?Len (“Computer”)
Output – 8
Ex – ?Len (“Computer Software”)
Output – 17
LEFT () – यह Function दिए गए Text या Character में दिए गए Number के अनुसार Left से Character को वापस करता है
Ex – ?Left (“Computer”,4)
Output – Comp
RIGHT () – यह Function दिए गए Text या Character में दिए गए Number के अनुसार Right से Character को वापस करता है
Ex – ?Right (“Computer”,3)
Output – ter
SUBSTR () – यह Function दिए गए Text या Character में दिए गए Number तथा Length के अनुसार Character को वापस करता है
Ex – ?Substr (“Computer”,4)
Output – puter
?Substr (“Computer”,4,3)
Output – put
UPPER () – यह Function दिए गए Text या Character को Upper Case में वापस करता है
Ex – ?Upper (“computer”)
Output – COMPUTER
Replace All Name With Upper (Name)
LOWER () – यह Function दिए गए Text या Character को Lower Case में वापस करता है
Ex – ?Lower (“COMPUTER”)
Output – computer
Replace All Name With Lower (Name)
PROPER () – यह Function दिए गए Text या Character को Proper Case में वापस करता है
Ex – ?Proper (“computer software”)
Output – Computer Software
Replace All Name With Proper (Name)
LTRIM () – यह Function दिए गए Text या Character में Left खाली स्थान (Blank Space) को Remove करता है
Ex – ?Ltrim (“ Computer”)
Output -Computer
Replace All Name With Ltrim (Name)
RTRIM () – यह Function दिए गए Text या Character में Right खाली स्थान (Blank Space) को Remove करता है
Ex – ?Rtrim (“Computer ”)
Output -Computer
Replace All Name With Rtrim (Name)
REPLICATE () – यह Function दिए गए Text या Character को Number के अनुसार Repeat करता है
Ex – ?Replicate (“Computer ”,5)
Output – Computer Computer Computer Computer Computer
ASC () – यह Function दिए गए Text या Character को ASCII CODE के Number के अनुसार वापस करता है
Ex – ?ASC (“A”)
Output – 65
Ex – ?ASC (“a”)
Output – 97
CHR () – यह Function दिए गए Number को ASCII CODE के Character के अनुसार वापस करता है
Ex – ?CHR (65)
Output – A
Ex – ?CHR (97)
Output – a
NUMERIC/OTHER FUNCTIONS in FoxPro
SQRT () – यह Function दिए गए Number का Square Root (वर्गमूल) वापस करता है
Ex – ?SQRT(25)
Output – 5
Ex – ?SQRT (20)
Output – 4.47
ABS () – यह Function दिए गए Number की Absolute Value वापस करता है
Ex – ?ABS(-25)
Output – 25
Ex – ?ABS (25)
Output – 25
SIGN () – यह Function दिए गए Number Positive या Negative Sign को वापस करता है
Ex – ?SIGN(-25)
Output – -1
Ex – ?SIGN (+25)
Output – 1
MOD () – यह Function दिए गए Number की Remainder (शेषफल) को वापस करता है
Ex – ?MOD(5,2)
Output – 1
Ex – ?MOD (8,2)
Output – 0
Ex – ?MOD (15,4)
Output – 3
Ex – ?MOD(2,5)
Output – 2
Ex – ?MOD (-15,4)
Output – 1
Ex – ?MOD (15,-4)
Output – -1
Ex – ?MOD (-15,-4)
Output – -3
Ex – ?MOD (0,5)
Output – 0
Ex – ?MOD (5,0)
Output – Error – Cannot Divide By 0
INT () – यह Function दिए गए Number की INTEGER वापस करता है
Ex – ?INT(5.2)
Output – 5
Ex – ?INT (5.9)
Output – 5
Ex – ?INT (-5.2)
Output – -5
CEILING () – यह Function दिए गए Number के Next INTEGER को वापस करता है
Ex – ?Ceiling (5.2)
Output – 6
Ex – ?Ceiling (5.9)
Output – 6
Ex – ?Ceiling (-5.2)
Output – -5
FLOOR () – यह Function दिए गए Number के Previous INTEGER को वापस करता है
Ex – ?Floor (5.2)
Output – 5
Ex – ?Floor (5.9)
Output – 5
Ex – ?Floor (-5.2)
Output – – 6
ROUND () – यह Function दिए गए Number की Round Up Value को वापस करता है
Ex – ?Round (7.285468,2)
Output – 7.29
Ex – ? Round (7.285468,3)
Output – 7.285
Ex – ?Floor (9.99999,2)
Output – 10.00
MIN () – यह Function दिए गए Numbers में से Minimum Value को वापस करता है
Ex – ?Min (8,4,6,7,3,5)
Output – 3
MAX () – यह Function दिए गए Numbers में से Maximum Value को वापस करता है
Ex – ?Max (8,4,6,7,3,5)
Output – 8
SIN () – यह Function दिए गए Numbers की SIN Value को वापस करता है
Ex – ?Sin (25)
Output – -0.13
COS () – यह Function दिए गए Numbers की COS Value को वापस करता है
Ex – ?Cos (25)
Output – 0.99
TAN () – यह Function दिए गए Numbers की TAN Value को वापस करता है
Ex – ?Tan (25)
Output – 0.13
LOG () – यह Function दिए गए Numbers की LOG Value को वापस करता है
Ex – ?Log (25)
Output – 3.22
Ex – ?Log10 (25)
Output – 1.40
FV () – यह Function दिए गए Amount में Rate of Interest तथा Time के अनुसार Future Value को वापस करता है
Ex – ?FV (1000,.10,3)
Output – 3310
EOF () And BOF () – यह Function Open File में Record Pointer के End of File या Beginning of File में होने पर .T. (True) या .F. (False) को वापस करता है
Ex – ?EOF ()
Output – .T. या .F.
Ex – ?BOF ()
Output – .T. या .F.
RECNO () – यह Function Open File में Record Pointer के Record Number को वापस करता है
Ex – ?Recno ()
Output – 1 (यदि Record Pointer 1 पर हो)
RECCOUNT () – यह Function Open File में Total Record Number को वापस करता है
Ex – ?Reccount ()
Output – 10 (यदि File में 10 Records हो)
इन्हें भी पढ़ें
Sorting in FoxPro
FoxPro Mathematical Commands
FoxPro SET Commands
Click Here To Read What is FoxPro and Commands with Example
Important Question Answer
Click Here for Important Question-Answer – Computer
Click Here for Important Question-Answer – Indian Geography
Click Here for Important Question-Answer – World Geography
Click Here for Important Question-Answer – Indian History
Click Here for Important Question-Answer – Economy
Click Here To Go To Home Page and Get More Knowledge