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

Antônio antoniog12345 at gmail.com
Sat Aug 21 15:49:10 CEST 2010


I had not seen Henry's routine.

Antônio

2010/8/21 Alberto Narduzzi <albertonarduzzi at yahoo.com>:
> Antônio,
>
> why reinvent the wheel...?
>
> as already pointed out by Henry yesterday:
>
> http://freepascal.org/docs-html/rtl/strutils/dec2numb.html
> http://freepascal.org/docs-html/rtl/strutils/numb2dec.html
>
> it is as easy as:
>
> Uses strutils;
>
> Procedure IncrementHex(Var HexS:String);
> Begin
>  HexS := dec2numb(numb2dec(HexS) + 1);
> End;
>
>
> Cheers, A.
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>




More information about the Lazarus mailing list