Incremental Operator?

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Locked
elliebee
Forum Newbie
Posts: 4
Joined: Mon Mar 20, 2006 2:21 am

Incremental Operator?

Post 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!
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Incremental Operator?

Post 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.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Post by VladSun »

sprintf (look at %x or %X type specifiers)
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Duplicate thread. Locked.

viewtopic.php?t=76239&highlight=
Locked