Nov 4, 2001, 10:05 PM
Post #3 of 6
All the data in the report is loaded into an array...hmmm...I just had a thought...that could be an issue in the future. Oh, never mind.
Re: Checking if value exists in specific column of array
[In reply to]
The problem I am having has a hidden question: Is there a directly supported way to search through a specific column in an array. I know I can do a row loop and look in the column in question, but I am looking for a GREP-ish (not nessecarily GREP, but any function that does EXACT pattern-matching) like call that would do the same thing.
The main issue is I have to search the entire array everytime I generate a number...and if that number exists, generate another number and search again...and again...and again, until a unique ID is generated. If the array is large (>10,000), this can start to bog down a machine. I need a faster way.
I like the hash idea...but how to make that concept work in an array???
Thanks for the help.
http://www.shrum.net/programming - Free Perl Scripts
http://www.shrum.net/soaring - Sailplane Soaring and Combat
(This post was edited by s_shrum on Nov 4, 2001, 9:11 PM)