• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Incremental Character Generator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incremental Character Generator


  • Subject: Re: Incremental Character Generator
  • From: email@hidden
  • Date: Tue, 21 Nov 2000 21:56:33 EST

I'd do the same as Michelle and use:
'repeat with loop1 from 97 to 122' --without adding 96 to the variables

might save some time (seconds?)

HTH,
John

In a message dated 11/21/00 8:42:34 PM, email@hidden writes:

>On 11/21/00 2:14 PM, Greg Strange <email@hidden> wrote
>
>
>
>>I am trying to get a sequential, incremental increase of a string. It
>is
>
>>easier to explain through example.
>
>>
>
>>I want to take, say, four characters, say : aaaa
>
>>
>
>>and increment them through aaab, aaac, aaad, aaae, aaaf, aaag, aaah, etc.
>
>>and then it rolls over and goes aaba, aabb, aabc, aabd, aabe, aabf, etc.
>
>>until it would end with zzzz. This of course would generate (assumption
>of
>
>>32 letters in the alphabet) 32^4 strings.
>
>>
>
>>The number of characters in the string could be as many as 20. How would
>I
>
>>begin with this projekt?
>
>>
>
>>Thank you for your help.
>
>
>
>This is very brute force, and someone else may have a more elegant way
>of
>
>doing it, but it works.
>
>
>
>--Michelle
>
>
>
>repeat with loop1 from 1 to 26
>
> repeat with loop2 from 1 to 26
>
> repeat with loop3 from 1 to 26
>
> repeat with loop4 from 1 to 26
>
> set test to (ASCII character (loop1 + 96)) & (ASCII character
(loop2
>
>
>+ 96)),
>
> & (ASCII character (loop3 + 96)) & (ASCII character (loop4 + 96))
>
> --do something with test
>
> end repeat
>
> end repeat
>
> end repeat
>
>end repeat
>
>
>
>----------------------------------------------------------------------
>
>| Michelle Steiner | Hard as it may be to believe, my |
>
>| email@hidden | life has been based on a true story. |
>
>----------------------------------------------------------------------


  • Prev by Date: Re: Adding addresses to Eudora Nickname
  • Next by Date: re:"move the contents of a document into a variable/record..."
  • Previous by thread: Re: Incremental Character Generator
  • Next by thread: Re: Incremental Character Generator
  • Index(es):
    • Date
    • Thread