3
I’m making a code in Pascal where one of my arrays has alphabet values (from A to Z) for a personal project of the type Questions and Answers/ Meaning A to Z:
aux[1]:= 'a';
aux[2]:= 'b';
aux[3]:= 'c';
...
aux[24]:= 'x';
aux[25]:= 'y';
aux[26]:= 'z';
It was quick, but for a second I thought it was boring to have to type them, so I thought:
"I know text is text and number is number. But could the program (Pascal or any other) recognize the alphabet as a kind of textual sequence or alphabetic variable ?"
Something like:
Alfa:Array [ a..z] of 'variavel alfabetica'
Maybe some programs could include some sort of library or function, I don’t know, and I could use a sequence counter Alphabetical instead of numerical