View Full Version : To the Array Masters: Letters, not numbers!
Dreppan 11-08-2005, 02:52 AM I'm looking for a way that I can take a list of items in an array and assign them a listed value of alphabetc letters (starting at A,B,C...etc) instead of numerically. Is there an easy way to do this?
Any help would be appreciated!
|
|
Bonedaddy
11-08-2005, 03:21 AM
Closest I can think of is creating a two-variable array, or a matrix, as Maya calls it.
You could always create a second array with all the alphabet letters and rig up some translation function.
What's this for?
Dreppan
11-08-2005, 03:40 AM
Good idea -- but how to create the alphabet array? Do I have to delineate every single letter, or is there a function that automatically goes thru the alphabet?
Bonedaddy
11-08-2005, 06:11 AM
$alphabetArray[]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
Dreppan
11-09-2005, 04:44 PM
But of course -- this works like a charm, thanks!
enbee
11-09-2005, 11:30 PM
I have also just built a quick array full of letters to do this. But does anyone know if there is a way to reference a letter by using its ascii value?
CGTalk Moderation
11-09-2005, 11:30 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.