Results 1 to 3 of 3

Thread: Preformance question

  1. #1

    Thread Starter
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    There should be a way if 0 is a and 1 is b etc to use Chr and save yourself a buttload of time. Long case statements are slow as frozen molasses running uphill on Jupiter, if you know what I mean.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  2. #2
    New Member
    Join Date
    Sep 2000
    Posts
    2

    Smile do this....

    - put all the names into an array
    - get a random number from the array's lower bound to the array's upper bound

    unless i'm reading your post wrong, that should work
    and it should save you a lot of time (and code)

  3. #3

    Thread Starter
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    I don't know how much work that would save, based on what I understand of the post. But I am wrong a lot, I'm just human. Try:

    Dim I As integer, Name As String

    Input #x, Name
    For I = 1 to len(Name)
    Mid(Name,I,1) = Chr(Val(Mid(Name, I, 1) + Asc("a"))
    Next I

    This will convert numbers to names, with a=0,b=1,etc
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width