Solved

SIMPLE Question on Variables....

Posted on 2004-10-17
1
208 Views
Last Modified: 2010-04-23
I am writing a Irc client, and you will be seeing a lot more questions like this =) but, for this one, I want to accomplish this:

declare a new dcc, what im thinking is something like dim newdcc(dcc-cnt) as new dcc-connection

and under that variable newdcc() i would like

newdcc().ip
newdcc().filename
newdcc().port
newdcc().length

how would i go about creating that type of variable ? im just looking to declare it at this point...
0
Comment
Question by:addicktz
1 Comment
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 350 total points
ID: 12336105
Declare a Structure

Public Structure DCC_Connection
        Dim ip As String
        Dim filename As String
        Dim port As Integer
        Dim length As Long
    End Structure

Then you can have the above statement

However you wil not be able to use a variable in the array Dimension i.e. dcc-cnt

So what you can do is just declare

dim newdcc() as new dcc_connection

i.e. leave the dimension empty, then later on in your program you can write

ReDim  newdcc(dcc_Cnt)

This will work




0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question