| |
|
|
p.specht
| Michael Wodrichs IMPLODE-Función en Profano X3.1 Tuve hier para XProfan-11 rückgebaut - natürlich no así elegant como en X3...
Título de la ventana "Profan-11: PS_Explode$, PS_Implode$ & PS_Revert$, PS_ArrayPrint$"
cls
declarar s$,a1$[],t$,sz&
s$="The quick brown fox jumps over the lazy dog!"
a1$[]=PS_Explode$(s$," "):sz&=sizeof(a1$[])
imprimir " 0: ";a1$[0]
imprimir str$(int(sz&-1));": ";a1$[sz&-1]
imprimir " ---"
s$=PS_Implode$(a1$[],"´")
imprimir s$
imprimir PS_Revert$(s$,"'")
imprimir
PS_Arrayprint$(PS_Revert$(a1$[]),".......","|",6,"\n")
waitinput
end
Proc PS_Explode$ :parámetros s$,t$:declarar arr$[]:if t$>""
arr$[]=explode(s$,t$):más :setsize arr$[],len(s$)
arr$[]=mid$(s$,1+&index,1):endif:volver arr$[]
ENDPROC
Proc PS_Implode$ :parámetros arr$[],t$:declarar s$,sz&
sz&=sizeof(arr$[]):whileloop 0,sz&-1:s$=if(s$="",s$,s$+t$)+\
arr$[&Loop]:endwhile:volver s$
ENDPROC
Proc PS_Revert$
if left$(ptype$(1),2)="$[":parámetros arr$[]
declarar ass$[],sz&:sz&=sizeof(arr$[]):casenot sz&:volver arr$[]
setsize ass$[],sz&:dec sz&:ass$[]=arr$[sz&-&index]:volver ass$[]
elseif ptype$(1)="$":parámetros s$,t$:declarar r$,sz&:sz&=len(s$)
:Whileloop sz&:r$=mid$(s$,&Loop,1)+t$+r$:endwhile:volver r$
endif
ENDPROC
proc PS_Arrayprint$
if left$(ptype$(1),2)="$[":parámetros a__$[],ra$,sp$,nbr&,t$
declarar sz&,ct&:sz&=sizeof(a__$[])
imprimir ra$;
whileloop 0,sz&-1:inc ct&:imprimir a__$[&Loop];sp$;
if ct&=nbr&:imprimir t$;ra$;:ct&=0:endif
endwhile
más:imprimir " *type?* ";
endif
ENDPROC
|
|
|
| XProfan 11Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 24.05.2021 ▲ |
|
|
|
|
p.specht
| Heinz Brill ha dazu damals folgendes beigesteuert:
Título de la ventana "H.Brill-Implode for XProfan-11.2a free"
'Programa de Heinz Brill, de p.specht después de XProfan 11 portiert
CLS:font 2
Declarar A$[],B&[],C![],D%[],tmp$[]
A$[] = explode("Hallo,du,como !",",")
tmp$[]=explode("1, 2, 3, 4, 5",",")
setsize B&[],sizeof(tmp$[]):B&[]=val(tmp$[&index])
clear tmp$[]:tmp$[]=explode("1.5, 2.6, 10.7, 15.0, 20.30",",")
setsize C![],sizeof(tmp$[]):c![]=val(tmp$[&index])
clear tmp$[]:tmp$[]=explode("987,654,321",",")
setsize D%[],sizeof(tmp$[]):D%[]=val(tmp$[&index])
clear tmp$[]
imprimir sizeof(A$[]), sizeof(B&[]), sizeof(C![]), sizeof(D%[])
Imprimir "\n Anfang>";Implode(A$[],"|");"<Ende"
Imprimir "\n Anfang>";Implode(B&[],",");"<Ende"
Imprimir "\n Anfang>";Implode(C![]," *** ");"<Ende"
Imprimir "\n Anfang>";IntImplode(D%[],",");"<Ende"
Waitinput
End
|
|
|
| Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 28.05.2021 ▲ |
|
|
|
|
H.Brill | Hier ni kürzere Versión, el en Versión 11.2 auch va :
Declarar A$[], B&[], C![], D$[]
CLS
A$[0] = "Hallo"
A$[1] = "du"
A$[2] = "da !"
B&[0] = 1
B&[1] = 2
B&[2] = 3
B&[3] = 4
B&[4] = 5
C![0] = 1.5
C![1] = 2.6
C![2] = 10.7
C![3] = 15.0
C![4] = 20.30
Imprimir Implode(A$[], "-")
Imprimir Implode(B&[], ",")
Imprimir Implode(D$[], "")
Imprimir Implode(C![], ",")
WaitKey
PROC Implode
CLEARLIST
Select pType$(1)
CaseOf "$[]"
Parámetros B$[], D$
RETORNO IF(MoveArrToList(B$[]), MoveListToStr$(D$), "")
CaseOf "&[]"
Parámetros B&[], D$
RETORNO If(MoveArrToList(B&[]), MoveListToStr$(D$), "")
CaseOf "%[]"
Parámetros B%[], D$
If(MoveArrToList(B%[]), MoveListToStr$(D$), "")
CaseOf "![]"
Parámetros B![], D$
Conjunto("Decimals", 2)
RETORNO If(MoveArrToList(B![]), MoveListToStr$(D$), "")
EndSelect
ENDPROC
End
|
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 21.10.2021 ▲ |
|
|
|