🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: nl.comp.programmeren
Article #687

Re: vb variables

#687
From: Araldo van de Kraats
Date: Sat, 23 Sep 2000 00:06
38 lines
1970 bytes
ViperRT10 <TheDeadCyberdude@pandora.be> wrote in message
news:t7sy5.1231$Q57.27372@afrodite.telenet-ops.be...
> ik wil wat in een variabel zit + nog iets een variabel van maken en daar
dan
> iets in steken
> bijvoorbeeld
> ik heb een variabel stof waar ts inzit (stof = ts)
> dan wil ik dus
> ts_planet1 =  someting
>
> na een tijdje wil word stof gs ofzo
> dan wil ik
> gs_planet1 = somting

Variabelnamen dynamisch genereren/aanpassen kan bij mijn weten niet met vb.
Daarvoor in de plaats kun je verzamelingen (collections) gebruiken.

Bijvoorbeeld:
======================
'declaratie
Dim planet1 As New Collection
Dim stof As String
Dim resultaat1 As String
Dim resultaat2 As String

'initialisatie
planet1.Add "someting", "ts"
planet1.Add "somting", "gs"

'uitlezen
stof = "ts"
resultaat1 = planet1.Item(stof)
stof = "gs"
resultaat2 = planet1.Item(stof)
======================

Groeten,
Araldo van de Kraats
Technical Details
Message-ID: <8qgs7d$9gb$1@dinkel.civ.utwente.nl>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!195.64.68.27!newsgate.cistron.nl!news.cs.utwente.nl!news.nic.utwente.nl!not-for-mail
References: <t7sy5.1231$Q57.27372@afrodite.telenet-ops.be>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: 107324,ab5cea93e43b1264
X-Google-Attributes: gid107324,public
X-Google-Thread: fcea4,ab5cea93e43b1264
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2000-09-22 17:08:16 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!195.64.68.27!newsgate.cistron.nl!news.cs.utwente.nl!news.nic.utwente.nl!not-for-mail
From: "Araldo van de Kraats" <a.vandekraats@student.utwente.nl>
Newsgroups: nl.comp.programmeren,be.comp.programming
Subject: Re: vb variables
Date: Sat, 23 Sep 2000 02:06:37 +0200
Organization: University of Twente, Enschede, The Netherlands
Lines: 40
Message-ID: <8qgs7d$9gb$1@dinkel.civ.utwente.nl>
References: <t7sy5.1231$Q57.27372@afrodite.telenet-ops.be>
NNTP-Posting-Host: cal040011.student.utwente.nl
X-Server-Date: 23 Sep 2000 00:07:09 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200