Re: How to find available number in a list?



Chris,

> Why not use a random number for this id-field? Then scan the array if it
> is already in use and if it is, generate a new one.

That would work fairly well as long as the database is mostly empty. But,
as it got full, there would be a lot of generating and scanning till I
happened upon an unused number. And, random numbers can repeat from time to
time which seems like a waste of time too.

Thanks for the input!

Anthony
.



Relevant Pages

  • Re: Looking for speed performance to draw line.
    ... each item in an array, that being the next and/or previous indexes. ... and it's next pointer to the previous item's original next pointer. ... Next -1, Prev 0 ... shapes up into shape classes that implemented the required commands ...
    (microsoft.public.vb.winapi.graphics)
  • Re: Multiple Condition Sumif Formula
    ... Andy. ... > revenue column. ... > & I've tried to enter the formula as an array by doing ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Sum product help needed with an extra variable please and than
    ... > Could you check reply all I got was my formula relating to E and C cell ... > arrays not the extra help I need for the B array ... >> Hi Anthony, ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Row Compression
    ... Otherwise, use Jim's suggestion ... > And want to remove rows with a blank in column 1 and collapse the whole ... > array to get: ... Prev by Date: ...
    (microsoft.public.excel.misc)
  • scroll select
    ... arr = getMultiple; ... var keep_array = new Array; ... Prev by Date: ...
    (comp.lang.javascript)