🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #611

Re: Da punto a virgola

#611
From: only-Offroad
Date: Thu, 03 Nov 2005 14:29
63 lines
2506 bytes
Ivan ha scritto:
> Qualcuno mi pu� dare la dritta x intercettare in un text numerico un 
> punto(.) e trasformarlo in virgola (,).
> Ho provato con Cstr ma non riesco.Da qui si vede che sono un neofita.Grazie
> Ivan 
> 
> 
Questa funziona molto bene
'-----------------------------------------------------------------------
   Public Function ZX_ReplaceAll(szBuffer As String, szIn As String, _

                                szNew As String) As Boolean

   ' Trova TUTTE le occorrenze di szIn all'interno di szBuffer _

     e le sostituisce con szNew



   Dim szTemp0 As String, szTemp1 As String

   Dim lLong As Long

   On Error GoTo ERROR_ZX_ReplaceAll



       Do While lLong <= Len(szBuffer)

         lLong = lLong + 1

         szTemp0 = Mid(szBuffer, lLong, 1)

         If szTemp0 = szIn Then

           szTemp1 = szTemp1 & szNew '& szTemp0

         Else

           szTemp1 = szTemp1 & szTemp0

         End If

       Loop

     szBuffer = szTemp1

     ZX_ReplaceAll = True



   Exit Function

ERROR_ZX_ReplaceAll:

     ZX_ReplaceAll = False

   End Function 'ZX_ReplaceAll


-- 
ciao Max
         ...  per raggiungermi, -il fuoristrada- non ti serve!
Technical Details
Message-ID: <436a1ebd$0$22303$4fafbaef@reader1.news.tin.it>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!feeder.news.tin.it!spool.news.tin.it!not-for-mail
References: <43635ccb$0$29558$4fafbaef@reader1.news.tin.it>

Show Full Headers
Complete Article Headers
X-Google-Thread: f94ee,eed7ca695caee50b
X-Google-Attributes: gidf94ee,public
X-Google-Language: ITALIAN,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!feeder.news.tin.it!spool.news.tin.it!not-for-mail
Date: Thu, 03 Nov 2005 15:29:17 +0100
From: only-Offroad <staff-RANGEROVER-@onlyoffroad.com>
Reply-To:  staff-RANGEROVER-@onlyoffroad.com
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013)
X-Accept-Language: it, it-it, en-us, en
MIME-Version: 1.0
Newsgroups: free.it.visual-basic
Subject: Re: Da punto a virgola
References: <43635ccb$0$29558$4fafbaef@reader1.news.tin.it>
In-Reply-To: <43635ccb$0$29558$4fafbaef@reader1.news.tin.it>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 63
Message-ID: <436a1ebd$0$22303$4fafbaef@reader1.news.tin.it>
Organization: TIN.IT (http://www.tin.it)
X-Comments: Please send technical notifications to newsmaster@tin.it
NNTP-Posting-Host: 82.48.246.132
X-Trace: 1131028157 reader1.news.tin.it 22303 82.48.246.132:16456
X-Complaints-To: Please send abuse reports to abuse@tin.it