[Lazarus] How can I increment/decrement a alphanumeric value?

waldo kitty wkitty42 at windstream.net
Fri Aug 20 05:11:50 CEST 2010


On 8/19/2010 15:54, dmitry boyarintsev wrote:
> On Thu, Aug 19, 2010 at 7:36 PM, silvioprog<silvioprog at gmail.com>  wrote:
>>   E.g:
>>
>> 001
>> 002
>> ..
>> 00A
>> 00B
>> ..
>> 0A0
>> 0A1
>> ..
>> ZZZ
>>
>> Is there a native routine in Free Pascal to do that?
>
> Feels like a college task.

or maybe even freshman high school...

> There's no such routine.
> You can write a routine that converts alphanumeric number to integer
> and back. Since it's easier to evaluate integers.

can't


var foo char;

inc(foo)?


there's also always the array[0..Z] method, too ;)

breaking out into individual positions in the "string" is something else to play 
with :P




More information about the Lazarus mailing list