Global ttrenn$ = "'" ;Trennzeichen
Print "1234567 -> "+ pointing$("1234567")
Waitkey
End
;---
Function pointing$(zahl$)
;Grundfunction von rallimen, erweitert+verändert von Triton
;zahl element Q
l=Len(zahl$)
If Left$(zahl$,1)="-" Then
minus=1
zahl$=Right$(zahl$,l-1)
l=l-1
End If
bruchpos = Instr(zahl$,"/",2)
If bruchpos > 0 Then
zahla$=pointing$(Left$(zahl$, bruchpos-1))
zahlb$=pointing(Mid$(zahl$,bruchpos+1))
If minus = 1 Then Return "-"+zahla$+"/"+zahlb$
If minus = 0 Then Return zahla$+"/"+zahlb$
End If
kommapos = Instr(zahl$,komma$,2)
If kommapos > 0 Then
zahlb$=zahl$
zahl$=Left$(zahlb$,kommapos-1)
zahlb$=Mid$(zahlb$,kommapos)
End If
While Len(zahl$) > 3
b$ = ttrenn$ + Right$(zahl$,3) + b$
zahl$ = Left$(zahl$,Len(zahl$) - 3)
Wend
If minus=1 Then Return "-"+zahl$ + b$ + zahlb$
Return zahl$ + b$ + zahlb$
End Function
|