![VFP ·R¥ÎªÌªÀ°Ï º¶](templates/subSilver/images/vfps.jpg) |
VFP ·R¥ÎªÌªÀ°Ï ¥»°Q½×°Ï¬° Visual Foxpro ·R¥ÎªÌ¸gÅç¥æ¬yªº¦a¤è, ½Ð¦h¦h§Q¥Î"·j´M"ªº¥\¯à, ¥ý¬d¬Ý¬Ý¦³µL«e¨Ò¥i´`, ¦pªGÁÙ¦³¤£À´ªº¦Aµo°Ý. ³¡¥÷¥DÃD¦³ªþ¥[ÀÉ®×, ¶·¥ýµù¥U¦¨¬°ªÀ°Ï©~¥Á¤~¥i¥H¤U¸ü.
|
¤W¤@½g¥DÃD :: ¤U¤@½g¥DÃD |
µoªí¤H |
¤º®e |
CPS0204
µù¥U®É¶¡: 2014-08-24 ¤å³¹: 441
²Ä 1 ¼Ó
|
µoªí©ó: ¬P´Á¤@ ¤G¤ë 29, 2016 7:22 pm ¤å³¹¥DÃD: ¦p¦ó§Ö³t¤À¸Ñ¦r¦ê |
|
|
¨Ò:«È¤á¥N½Xa;«È¤á¥N½Xb;«È¤á¥N½Xc;
¦p¦ó¨D±o¤@ÓÄæ¦ì¬° cust_no c(³Ìªø¬°10½X) ªºcursor
¨Ò:ì¦r¤¸¤£©wªø«×,³Ì«á¤@½X¤£ºÞ¦³µL;
¥i¯à¬° a001,©Îa001;.............§Æ±æ¨D±oa001 ¤@µ§¸ê®Æ¿ý
©Îa001;b15............§Æ±æ¨D±oa001,b15¨âµ§¸ê®Æ¿ý
©Îa01;c3;d00008;e033;a01 ........§Æ±æ¨D±oa01,c3,d00008,e033µ¥¥|µ§¸ê®Æ¿ý.«ÂЪº¥h°£
½Ð°ÝÀ³¦p¦ó³]p?ÁÂÁ |
|
¦^³»ºÝ |
|
![](templates/subSilver/images/spacer.gif) |
perry
µù¥U®É¶¡: 2014-07-20 ¤å³¹: 203
²Ä 2 ¼Ó
|
µoªí©ó: ¬P´Á¤@ ¤G¤ë 29, 2016 7:51 pm ¤å³¹¥DÃD: |
|
|
¦pªG±z¸ê®Æ°Ï¤À¬O[ ; ]ªº¸Ü,¸Õ¸Õ¤U±³oӤ覡!!
¥N½X: |
priv aa,bb,cc,dd,j1,j2,i
aa='a01;d800a;c03;a01;cc002;c03'
*«e«á¥[ÃѧO½X
bb=IIF(left(aa,1)=';','',';')+aa+iif(righ(aa,1)=';','',';')
sele 0
crea curs test (cust_no c(10))
cc=occu(';',aa) &&pºâÃѧO½XÁ`¼Æ
for i=1 to cc-1
j1=at(';',aa,i)
j2=at(';',aa,i+1)
*¨ú¥X«È¤á¥N¸¹
dd=subs(aa,j1+1,j2-j1-1)
inse into test valu (dd)
next
sele 0
sele cust_no from test grou by cust_no into curs testx
go top
brow
use in testx
use in test
|
|
|
¦^³»ºÝ |
|
![](templates/subSilver/images/spacer.gif) |
CPS0204
µù¥U®É¶¡: 2014-08-24 ¤å³¹: 441
²Ä 3 ¼Ó
|
µoªí©ó: ¬P´Á¤@ ¤G¤ë 29, 2016 7:55 pm ¤å³¹¥DÃD: OK |
|
|
·í¤¤ªºbb¦n¹³¨S¥Î¨ì? |
|
¦^³»ºÝ |
|
![](templates/subSilver/images/spacer.gif) |
perry
µù¥U®É¶¡: 2014-07-20 ¤å³¹: 203
²Ä 4 ¼Ó
|
µoªí©ó: ¬P´Á¤G ¤T¤ë 01, 2016 6:27 am ¤å³¹¥DÃD: |
|
|
¼g¤Ó§Ö¨S§ï¨ì= ='''
¥N½X: |
.
.
cc=occu(';',bb) &&pºâÃѧO½XÁ`¼Æ
for i=1 to cc-1
j1=at(';',bb,i)
j2=at(';',bb,i+1)
*¨ú¥X«È¤á¥N¸¹
dd=subs(bb,j1+1,j2-j1-1)
inse into test valu (dd)
next
.
.
|
n³o¼Ë¤~¯à¥¿±`ºI¨ú¦r¦ê!! |
|
¦^³»ºÝ |
|
![](templates/subSilver/images/spacer.gif) |
syntech
µù¥U®É¶¡: 2003-05-16 ¤å³¹: 4212 ¨Ó¦Û: Taipei,Taiwan
²Ä 5 ¼Ó
|
µoªí©ó: ¬P´Á¤G ¤T¤ë 01, 2016 9:54 am ¤å³¹¥DÃD: |
|
|
http://stevenblack.com/articles/text-and-string-handling-in-VFP/
VFP 7 : WORDS(),WORDNUM()
VFP 9 : GETWORDNUM(),GETWORDCOUNT()
¥N½X: |
Str_a = 'a01;c3;d00008;e033;a01 ........'
Str_Count = GETWORDCOUNT(Str_a,';')
for i=1 to Str_Count
? GETWORDNUM(Str_a,i,';')
next
|
---
¨ä¹ê§Ú¬Oèè¤~ª¾¹Dªº,
PHP ¦³ split() ¥i¥H¥Î,
¦ý¬O ¤£ª¾¹DVFP ¦³¨S¦³Ãþ¦üªº¥i¥H¥Î.
GOOGLE¤@¤U,µo²{VFP7¥H¤W¦³´£¨ÑÃþ¦ü¨ç¦¡ _________________ ¦pªG¤½¥q¦³¤U¦C§xÂZ:
1. §ä¤£¨ì«K©y,§Ö³t,²©öªº ¥Í²£±Æµ{³nÅé
2. ¤£ª¾¹D¦p¦ó§Ö³t±Æ©w ±ÄÁÊp¹º
3. ¦¨¥»§ì¤£·Ç,¦Û¤vºâ¤ñ³nÅéºâ¦³¥Î
4. ·Q¾Ç²ß¨t²Î³W¹º,·Q§ä¨t²Î¬[ºcªºÅU°Ý
½ÐÁpµ¸§ÚÌ,¤]³\§ÚÌÀ°±o¤W¦£ |
|
¦^³»ºÝ |
|
![](templates/subSilver/images/spacer.gif) |
oldbb
µù¥U®É¶¡: 2007-02-28 ¤å³¹: 83
²Ä 6 ¼Ó
|
µoªí©ó: ¬P´Á¤T ¤T¤ë 02, 2016 8:04 am ¤å³¹¥DÃD: |
|
|
FOR i = 1 TO ALINES(aSS, "a01;c3;d00008;e033;a01 ........", ";")
? aSS[i]
ENDFOR |
|
¦^³»ºÝ |
|
![](templates/subSilver/images/spacer.gif) |
ezpos
µù¥U®É¶¡: 2011-04-20 ¤å³¹: 323
²Ä 7 ¼Ó
|
µoªí©ó: ¬P´Á¤T ¤T¤ë 09, 2016 12:01 am ¤å³¹¥DÃD: |
|
|
Declare aryInfo[3]
getstr2array(@aryInfo,tcInfo)
**********************************
* ¥Î³~:¦r¦êÂà°}¦C.taArray»Ý¥Î¶Ç§}¤è¦¡
* °Ñ¼Æ:
* ¶ÇÈ:
* ½d¨Ò:
**********************************
Function getstr2array(taArray,tcStr,tcDelimitor,tnColCnt)
If Para()<4
tnColCnt=1
Endif
If Para()<3
tcDelimitor=','
Endif
Local lnRowCnt,lnStartPos,lnLenght,i,J,lnDCnt,lnElementCnt
lnElementCnt=Occurs(tcDelimitor,tcStr)+1
lnRowCnt=Ceiling( (lnElementCnt)/tnColCnt )
Dimension taArray[lnRowCnt,tnColCnt]
tcStr=Iif( Left(tcStr,1)=tcDelimitor,'',tcDelimitor) +tcStr + ;
IIF( Right(tcStr,1)=tcDelimitor,'',tcDelimitor)
lnDCnt=1
For i=1 To lnRowCnt
For J=1 To tnColCnt
If lnDCnt>lnElementCnt
taArray[i,j]=''
Else
lnStartPos=At(tcDelimitor,tcStr,lnDCnt) + 1
lnLenght=At(tcDelimitor,tcStr,lnDCnt+1) - lnStartPos
taArray[i,j]=Subs(tcStr,lnStartPos,lnLenght)
Endif
lnDCnt=lnDCnt+1
Endfor
Endfor
Endfunc _________________ ezPos¦¬»È¾÷ ²³æ¦n¥Î§C¦¨¥» http://www.ezpos.info
¥þ·s¬üÆ[ªºPOS¦¬»È¾÷.POS³nµwÅé¯Ó§÷.
³nÅé«È¨î¤Æ.ºô¯¸³W¹º....¯àÁÈ¿úªº³£¥i¥H§ä§Ú
http://www.twelife.com ¥xÆW¥Í¬¡ºô |
|
¦^³»ºÝ |
|
![](templates/subSilver/images/spacer.gif) |
perry
µù¥U®É¶¡: 2014-07-20 ¤å³¹: 203
²Ä 8 ¼Ó
|
µoªí©ó: ¬P´Á¤T ¤T¤ë 09, 2016 6:43 am ¤å³¹¥DÃD: |
|
|
Y¥u¬On¦r¦ê¥h±¼«½Æªº,
¦Û¤v¶}µo¨Sª©¥»¨îªº¨ç¼Æ¤~¹ê»Ú!!
¥N½X: |
proc exacstr
lpar data_str,data_deli
priv aa,bb,cc,dd,j,j1,j2
if para()<1 or vartype(data_str)#'C'
retu
endi
data_deli=iif(para()<2,',',data_deli)
aa=iif(left(data_str,1)=data_deli,'',data_deli)+allt(data_str)+iif(righ(data_str,1)=data_deli,'',data_deli)
bb=occu(data_deli,aa)
store '' to cc,dd
for j=1 to bb-1
j1=at(data_deli,aa,j)+1
j2=at(data_deli,aa,j+1)
cc=allt(subs(aa,j1,j2-j1))
dd=dd+iif(at(data_deli+cc+data_deli,data_deli+dd)<1,cc+data_deli,'')
next
retu dd
|
aa='a01;d800a;c03;a01;cc002;c03'
aa=exacstr(aa,';')
?aa
** ÃD¥~¸Ü
¦Û¦æ¶}µoªº¥\¯à ¦p:¿W¥ßªº¤U©Ô¦¡¥\¯à¿ï³æ¥H .prg ¤è¦¡
¥un©Ò¦³Åܼƪ«¥ó¦WºÙ©w¸q¬° ¨p¦³(Private)
¨Ì Window ¯S©Ê,¥i«½Æ(VFP®e³\ªº°O¾ÐÅé½d³ò¤º)µL¦P®É°õ¦æ,
©¼¦¹ÅܼÆȤ£·|¤zÂZ!!
¥N½X: |
** tsk24.prg
proc tsk24
lpar xomy_str
priv my_str
my_str=iif(para()<1,1,iif(vartype(xomy_str)#'N',1,xomy_str))
?my_str
do tsk241 with my_str
?my_str
|
¥N½X: |
**tsk241.prg
proc tsk241
lpar xomy_str
priv my_str
my_str=iif(para()<1,1,iif(vartype(xomy_str)#'N',1,xomy_str))
my_str=my_str+1
if my_str<5
?my_str
do tsk24 with my_str
endi
|
·í±z°õ¦æ do tsk24 ¬Ý¬Ý·|µo¥Í¤°»ò¨Æ |
|
¦^³»ºÝ |
|
![](templates/subSilver/images/spacer.gif) |
perry
µù¥U®É¶¡: 2014-07-20 ¤å³¹: 203
²Ä 9 ¼Ó
|
µoªí©ó: ¬P´Á¥| ¤T¤ë 10, 2016 11:18 pm ¤å³¹¥DÃD: |
|
|
dd=dd+iif(at(data_deli+cc+data_deli,data_deli+dd)<1,cc+data_deli,'')
¸ê®Æªø«×¤£¤@P,n§ï¦¨³o¼Ë,¤ñ¹ï®É¤~¤£·|»~§P= ='''
aa='001;003;01;200;00;040;0003;0200;001'
bb=exacstr(aa,';')
?bb |
|
¦^³»ºÝ |
|
![](templates/subSilver/images/spacer.gif) |
lygcw9603
µù¥U®É¶¡: 2011-12-25 ¤å³¹: 129
²Ä 10 ¼Ó
|
µoªí©ó: ¬P´Á¤ ¤T¤ë 15, 2024 8:55 pm ¤å³¹¥DÃD: |
|
|
¸Õ¸Õ¡Galines() |
|
¦^³»ºÝ |
|
![](templates/subSilver/images/spacer.gif) |
|
|
±z µLªk ¦b³oÓª©±µoªí¤å³¹ ±z µLªk ¦b³oÓª©±¦^ÂФ峹 ±z µLªk ¦b³oÓª©±½s¿è¤å³¹ ±z µLªk ¦b³oÓª©±§R°£¤å³¹ ±z µLªk ¦b³oÓª©±¶i¦æ§ë²¼ ±z µLªk ¦b³oÓª©±ªþ¥[ÀÉ®× ±z µLªk ¦b³oÓª©±¤U¸üÀÉ®×
|
Powered by phpBB © 2001, 2005 phpBB Group ¥¿Å餤¤å»y¨t¥Ñ phpbb-tw ºûÅ@»s§@
|