Initial: flux text FoxBin2Prg (git urmareste .??2 in-arbore, binarele VFP git-ignored)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-16 10:55:38 +03:00
commit 2f59024385
1271 changed files with 820556 additions and 0 deletions

38
programe/lista2cursor.prg Normal file
View File

@@ -0,0 +1,38 @@
PROCEDURE lista2cursor
PARAMETERS tcLISTA,tcAlias,tcCol1,tcSeparator
&& tcLista este un sir de caractere care contine elementele separate prin <;> default
&& tcAlias este cursorul care se completeaza - trebuie dat prin referinta
&& tcSeparator separatorul de elemente din tcLista - default este ";" - este optional
&& intoarce numarul de elemente gasite
&& ex: lnNr = lista2array("ana;are;mere",@alista,";")
LOCAL Lclista,lcSeparator,lnNRF,lcF1,i
lcLista=UPPER(ALLT(tcLISTA))
IF PARAMETERS()<3 OR EMPTY(tcSeparator)
lcSeparator=";"
ELSE
lcSeparator=ALLTRIM(tcSeparator)
ENDIF
IF RIGHT(Lclista,1)!=lcSeparator
Lclista=Lclista+lcSeparator
ENDIF
lnNRF=OCCURS(lcSeparator,lcLista)
FOR i=1 TO lnNRF
lcF1=LEFT(lcLista,AT(lcSeparator,lcLista)-1)
IF i!=lnNRF
lcLista=SUBSTR(lcLista,AT(lcSeparator,lcLista)+1)
ENDIF
INSERT INTO (tcAlias) (&tcCol1) VALUES (lcF1)
ENDFOR
RETURN lnNrf
ENDPROC && lista2cursor