well i'm a bit of a beginner programmer.. i've taken a few classes but every time i look at a piece of code i get lost easily.

But i do have a question..

I was reading this visual basic book and there was this thing about listing all of these record in order.. kinda like a bunch of arrays.. and organizing them by a certain field.

Well i got to wondering.. all though this would probably be easier if written to a file and taken out one record at a time i guess..

Is it possible to make a variable on the go?

Like say i made a for loop and i only wanted to declare a variable if Something was true, and that changed every time i ran the program. So like a For loop that ran through 100 times. And whatever was true 25%, 50% and 75%

then i'd only want 25 variables, 50 variable then, 75 variables..

so would i be able to make something where i created something like

Variable 1
Variable 2
Variable #

and so on until i didn't need anymore, and then i could easily sort records, and i'd imagine the program would run faster overall. Although i really have no idea i'm more just curious whether it's possible.

Oh and sorry if this is hard to read i'm having trouble expressing my question.

Member Avatar for iamthwee

No, no no no.

It's called using an array. And you populate whatever is true.

oh duh, i feel stupid.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.