🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.vbasic
Article #104412

Re: Prosba o uproszczenie funkcji

#104412
From: loki
Date: Sat, 19 Dec 2009 14:41
29 lines
1566 bytes
Tajan <Tajan@interia.pl> napisał(a): 

> Ewentualnie mozna też zaprząc do pracy i Join:
> 
> Public Function fragment(wartosc, separator, pozycja, ile_wyrazow)
> 
> Dim arrTablica As Variant
> Dim arrTablicaWyn As Variant
> Dim i As Integer
> 
> arrTablica = Split(wartosc, separator)
> 
> ReDim arrTablicaWyn(1 To ile_wyrazow)
> 
> For i = 1 To ile_wyrazow
>     arrTablicaWyn(i) = arrTablica(pozycja + i - 2)
> Next i
> 
> fragment = Join(arrTablicaWyn, separator)
> 
> End Function

Funkcja dziala poprawnie i szybko, tego potrzebowalem.
Wielkie dzieki.

Pozdrowka

-- 
Wysłano z serwisu Usenet w portalu Gazeta.pl -> http://www.gazeta.pl/usenet/
Technical Details
Message-ID: <hgiom0$6lp$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <hgdfq6$2ku$1@inews.gazeta.pl> <hgdjja$foq$1@inews.gazeta.pl> <hgdoe6$3ia$1@inews.gazeta.pl> <hgeh3l$3nt$1@inews.gazeta.pl> <hgfl9s$47c$1@nemesis.news.neostrada.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "loki" <loki21.SKASUJ@gazeta.pl>
Newsgroups: pl.comp.lang.vbasic
Subject: Re: Prosba o uproszczenie funkcji
Date: Sat, 19 Dec 2009 14:41:04 +0000 (UTC)
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 29
Message-ID: <hgiom0$6lp$1@inews.gazeta.pl>
References: <hgdfq6$2ku$1@inews.gazeta.pl> <hgdjja$foq$1@inews.gazeta.pl> <hgdoe6$3ia$1@inews.gazeta.pl> <hgeh3l$3nt$1@inews.gazeta.pl> <hgfl9s$47c$1@nemesis.news.neostrada.pl>
NNTP-Posting-Host: localhost
X-Trace: inews.gazeta.pl 1261233664 6841 172.20.26.239 (19 Dec 2009 14:41:04 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Sat, 19 Dec 2009 14:41:04 +0000 (UTC)
X-User: loki21
X-Forwarded-For: 82.139.52.15
X-Remote-IP: localhost
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit