Page 1 of 1

Incremental Operator?

Posted: Fri Nov 16, 2007 12:05 pm
by elliebee
Hello. I'm not sure if this topic falls under this category. Anyhow, I need to create an autogenerated incremental alphanumeric code. And it goes something like this:

001, 002, 003, ..., 009, 0A0, 0A1, etc....

I'm hoping you guys could help me out. Thanks so much!

Re: Incremental Operator?

Posted: Fri Nov 16, 2007 3:51 pm
by califdon
elliebee wrote:Hello. I'm not sure if this topic falls under this category. Anyhow, I need to create an autogenerated incremental alphanumeric code. And it goes something like this:

001, 002, 003, ..., 009, 0A0, 0A1, etc....

I'm hoping you guys could help me out. Thanks so much!
No, I don't think it does, but what are you trying to do? Are those supposed to represent hex values?? If so, you should express them in blocks of 2, 4, 6, etc., like 0009, 00A0 ...

What are you going to do with the "code"? What does it represent? Without knowing such information, it's impossible to advise you.

Posted: Sat Nov 17, 2007 4:53 am
by VladSun
sprintf (look at %x or %X type specifiers)

Posted: Sat Nov 17, 2007 6:28 am
by feyd
Duplicate thread. Locked.

viewtopic.php?t=76239&highlight=