incrementing letters like we do numbers...
James Flanagan
James at Flantec.com
Thu May 1 10:35:47 PDT 2014
Thank you all that responded. After looking at the solutions, I found that Bruce’s suggestion was exactly what i was looking for. thanks again to everyone.
James Flanagan
Flantec.com
email: James at Flantec.com
mobile: 760-458-8498
home: 219-221-6219
text: 7604588498 at txt.att.net
aim: Flantec
oovoo: Flantec
Skype: Flantec
ichat: Flantec at mac.com
home: 1901 Cidermill Road
Michigan City, IN 46360
On Apr 30, 2014, at 5:51 PM, Bruce Easton <bruce at stn.com> wrote:
> On 4/30/14 8:40 PM, James Flanagan wrote:
>> FreeBSD 9.2
>> Filepro 5.7.04
>>
>> I am looking for the most elegant way (i.e the fewest lines of code) to increment through the alphabet in a way similar to how i would do it with numbers.
>>
>> every year, i need to code to create the 26 folders for each letter of the alphabet. below is the basics of the code that i would like to use (but it does not work because when you add “1” to a a variable that is a letter, the variable becomes a number instead of incrementing the letter):
>>
>> fld_ltr::':
>> ::folder_letter="A":
>> fld_lop::':
>> ::folder=root_folder{slash{company_name{slash{"photos"{slash{job_year{slash{folder_letter:
>> ::unix="mkdir"<folder:
>> ::system noredraw unix
>> :folder_letter eq “Z":return:
>> ::folder_letter=folder_letter+"1":
>> ::goto fld_lop:
>>
>> I am hopeful that i can avoid writing 26 differently lines of code to account for each letter folder. thank you very much,
>>
>> James Flanagan
>> Flantec.com
>>
>>
> James, I believe on the line where you increment, you just need instead:
>
> ::folder_letter=chr(asc(folder_letter)+"1"):
>
> Bruce
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20140501/e6fdc457/attachment.html
More information about the Filepro-list
mailing list