Bob Schneider
asked on
Subtraction v Hex2Dec in vbscript
Lets say I had to iterate through a loop of 1000 rows of a text file and at each row I had to take a value and do one of the following:
1) If the value were a decimal value with 6 digits, subtract 100,000 from the value
2) If the value were a hex value, convert it to decimal.
Which would be quicker/use fewer resources?
Thank you!
1) If the value were a decimal value with 6 digits, subtract 100,000 from the value
2) If the value were a hex value, convert it to decimal.
Which would be quicker/use fewer resources?
Thank you!
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
1) I could encode the tags using 6 decimal digits (I have never seen a six-digit decimal rfid value come through my system). For instance, rfid tag 100001 would be used for bib #1, rfid tag 100002 would go on bib #2, etc. Then I just loop through and subtract 100000 from each tag before processing the results.
2) I could encode the tags using hex numbers and just convert to decimal prior to processing the results.
I prefer the first method because it is human-readable but it is even more important to process quickly.
Thanks for any additional clarity you can provide. I will look at the above links, code, suggestions, ...