473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Noob simple question

I have two text strings that I have read from a text file. The text strings that I have read are the 8 characters each, 859c58d4 and 80434d43. I have assigned them the varible names of string1 and string2.

This text strings in reality represent hex values.

How do I convert these text strings into numerical (long integers perhaps) so that I might subtract one from the other?

Please help a noob trying to learn VB6.

Rich
Jan 26 '08 #1
3 1121
daniel aristidou
491 256MB
How do I convert these text strings into numerical (long integers perhaps) so that I might subtract one from the other?

Rich
For Converting strings into integers etc we use "Cint(string)"
You can find a list of other "converters" in the object library type in "C" and you should find lots.....i believe there is one for hex
Jan 26 '08 #2
Killer42
8,435 Expert 8TB
Not sure what the size limits might be, but in the past I have used Val("&h" & String).
Jan 27 '08 #3
werks
220 100+
I have two text strings that I have read from a text file. The text strings that I have read are the 8 characters each, 859c58d4 and 80434d43. I have assigned them the varible names of string1 and string2.

This text strings in reality represent hex values.

How do I convert these text strings into numerical (long integers perhaps) so that I might subtract one from the other?

Please help a noob trying to learn VB6.

Rich

Hi there!

Are you trying to Subtract the Value String1 = 859c58d4 and String2 = 80434d43

You can CInt(string1) - CInt(String2), but the problem is there are alphabetical letters in the strings, so i think it will prompt you an error.. What does c and d do in 859c58d4 (-.-)???


Better Than Yesterday
Jan 27 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Ivan Shevanski | last post by:
Alright heres another noob question for everyone. Alright, say I have a menu like this. print "1. . .Start" print "2. . .End" choice1 = raw_input("> ") and then I had this to determine what...
3
by: pointBoarder | last post by:
So I have this query that returns ID Item Quantity primary text int unique I have a form with a command button that runs a function, but I need the function to be able...
5
by: TN Bella | last post by:
This sounds so simple...I want the textbox to automatically fill with today's date but how is that done? To lock it so the user can't edit it, I can use type="hidden" right? Thanks in advance for...
42
by: Holger | last post by:
Hi guys Tried searching for a solution to this, but the error message is so generic, that I could not get any meaningfull results. Anyways - errormessage:...
9
by: davetelling | last post by:
I am not a programmer, I'm an engineer trying to make an interface to a product I'm designing. I have used C# to make a form that interrogates the unit via the serial port and receives the data. I...
9
by: bjwillykajilly | last post by:
Ok, heres the deal, i'm using netbeans 5.5 to create a Rational calculator(1/2 + 2/3 = 5/6, so on so forth) anyways, I have looked up on google, on this site, everywhere, and I am apperently missing...
9
by: Ben | last post by:
Hello, I'll bet this has been asked a million times but I can't seem to find a thread that gives the clear example I need. This PC has MySQL and IIS configured and running. The MySQL database is...
0
by: irtehnoob | last post by:
Hi there, I'm pretty new to c# (started up a few days ago) and I'm making a simple program, so far everything is going good except I can't figure somethine out.. hence why I'm here. Anyways, in my...
5
by: jackinoob | last post by:
Hi All, Apologies in advance, this question is very rudimentary, but I can't seem to get it right. I am running python within cygwin. I have a python script called test.py, and inside it a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.