o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

How to compare two strings and integers -

Hi All,

I want to compare two strings /integer but I am not getting expected results
e.g

x = 5 , y = 5.00

x = y = Correct
-----------------------------------------------

x = "5" , y = "5.00"

x = y = incorrect

but

cint(x) = cint(y) = Correct

but if

x = "Yes", y = "Yes"

x = y = correct

but

cint(x) = cint(y) = Mismatch error


My question how do i handle this situation because sometime we compare strings and sometime integer with same statememnts and if it is integers sometime we get integer and sometimes we get double value

Thanks

 

Newbie questioon: String Comparison -
Ok, after looking on MSDN and doing some test of my own, I have no idea how to make this work. Basically, I have 2 strings which being compared. Now my problem is that they are the string representation of integers. For example: the Number 8 as "8". Ok obvious i know.


How to compare two strings and integers -
Hi All, I want to compare two strings /integer but I am not getting expected results e.g x = 5 , y = 5.00 x = y = Correct ----------------------------------------------- x = "5" , y = "5.00" x = y = incorrect but cint(x) = cint(y) = Corre


[2008] Tutor in VB2008 Integers/Strings Help -
I need Help programming and understanding Integers/Strings/Arrays. I have No coding experience. Could Someone Point me in the right Direction. I found this website. I just want to take a week to understanding using integers, Strings and Arrays.. If you can Help me That Would Be great.


VB [2008] Integers/Strings -
I Just Downloaded VB2008 Express Edition. Sorry, Theres no code. I really dont no what I am doing. I am Way over my head Here. Please tell me Where I can Start out. I Think I Need To Start at Integers Strings. I am also vary Confused. I Like to ask Questions About VB2008 and books do n


How to compare multiple (part) strings -
Hi, I have 2 listboxes and want to compare both and count in how many lines are identical strings. BUT .... I want to use part of the strings (same as with MID) and this part strings chance always. For example: I want to compare at the begin the characters 1-5 then 2-6 then 3-7 a


Concatonate strings/integers -
I'm dealing with some quite large strings and in order to concatonate 2 strings i'm using the following: string1 = string1 & string2 This looks like it could be simpler. Is there a method thats available? Also with integers is there an operator like in C (++/--) tha


[2008] System.String.Compare -
First post on this forum, so go easy on me. I am trying to Sort my DataGridRow. I am using the supplied MSDN code below. Now this works GREAT for Strings. I have searched high and low to get this to work for integers, but I have had no luck. Please help me sort my datagridview co


Comparing 2 arrays -
Hi, I have 2 arrays of integers with 8 elements in each one. Is there a function to compare both arrays, without actually looping throught both of them? Kind of like StrComp() for strings.


convert strings -
anyone know how to convert strings into integers? strings I meant not chars, I meants strings. #include <string.h>


Concatenating 2 integers Crystal -
hello, I need to join 2 integers together as if they were strings. ie. 10000 + 01 = 1000001 also how would I format it so a 1 would dispay 01? thanks!


complex string comparison -
Hi all, I want to compare 2 strings of text (product description) example: string 1: Cup. knee 12mm x 15mm cap. 90degr. string 2: VSH knee 12mm x 15mm 90 / cap. these 2 strings represent the same product (different suppliers) is there a way to compare the strings word by


Search for a string within a process's memory -
Is there a way to search for a specific string located in the memory? Similiar to cheatmaster posted on PSC.com, but for strings rather than integers. Or do those integers also represent strings? If so, is there a way to revert them back to string?


Can someone please help me! -
When you open a dll file or data file in notepad you see alot of weird writing that is unreadable. I was wondering how I could write information from strings and integers to a file and then make it look like that weird writing? Also how would I turn it back into readable writing so vis


ComPareTo Usage -
1. Write a class Compare3 that provides a static method largest. Method largest should take three Comparable parameters and return the largest of the three (so its return type will also be Comparable). Recall that method compareTo is part of the Comparable interface, so largest can use


Compare two strings or two files -
In my form I have two rich text boxes.In both of them I put two different text files(.txt or .rtf).I looking for some code to compare them, and to have the result as marked differences into the second rich text box.How I have to compare them-as strings or as files? And how I can use mi


Problems reading integers and strings from txt file ... -
sorry for being thick ... but im trying to save data to a text file and need to store my integers as char values how do i do this regards john


The Best Bubble Sort Method -
Whats the Best way to Bubble Sort Strings (Alphabetically) and the best way to Bubble Sort Integers Both of which come from an array etc: strings are in an array, integers are in an array... I only ask, because I cant seem to get it working to swell.. Got the logic down


Strings % Equivalent for Int32 -
Hi, I am looking for the equivalent of % in strings for Int32. For instance, for default I want the number field to be anything, which is % for strings but don't seem to work for integers... anyone know what value you can use for integer that pulls all data? Thanks


Best Way Compare string to list of strings(RESOLVED) -
Trying to figure out the best way to approach this. Basically I need to compare files(different each time) against a list of other strings to see if the file contains any of the strings(will be adding new ones to the list as I go on). I'll try to explain a bit more. For an exampl


[2.0] 7bit encoded integer -
So .net uses 7 bit encoded integers in the #US (user strings) table but I have this problem. I have 4 bytes 0xC0 12 31 83 which represents a string that is 596160(0x918C0) bytes long. I am using int ReadEncodedInt(byte[] b, ref int idx) { byte num3;


Reading VB6 random file -
Have random data files written with VB5/6 - known structure mixture of strings, singles and integers. Fairly new to VB Net 2005 Express and trying to figure out how to read files. Can read entire file as byte and extract strings but can't figure out how to read or parse singles and i


Sorting by value rather than alphabetically -
I have a listbox that contains strings and integers. The sort works fine for the columns containing strings, but when I sort the column containing integers it sorts it alphabetically. So it sorts it by the characters face value rather than the numerical value, like this... 1000 20


V.B 6.0: Comparing multiple integers -
V.B 6.0: Comparing multiple integers I just bought a visual basic 6 book. This will be my very first language. Im in ch 3 of he book and it gives an exercise and wants me to make a script to compare 3 random integers and make it print the smallest and largest of the 3. X is t


changing rowsource data type -
I have 2 comboboxes that i fill using the rowsource property. They are intended to be lists of integers. eg. 100;200;300......... i use these to do a comparison against one another. I now see that these values are automatically treated as strings. Is there a way to make them integ


exclusive OR of two integers -
Is there any direct way to exclusive OR two integers in VB? My method is to convert the integers to strings of their binary presentations, and then exclusive OR it character by character It seems silly. Any fast and direct method of doing this? Thanks


Compare texts strings in VB.NET from Access mdb -
Is there a way I can compare texts strings enter from a user at run time to an Access mdb field declared as memo? If there is a way, would anyone share it with me? The texts typed from a user at run time are from a text box compare to a SQL query from the Access mdb file. If that is no


Reading Integers -
How can i read integers from a txt file of numbers? I have tried to use BufferedReader and FileReader, but it seems like these can only read strings. Nevermind, i've solved my problem. Solution: Just convert the string input to an integer before writing it to the integer array


Matthew Gates or Megatron -
API read & write to an ini file. (Ok our knowledge base is down again, along with our web site, and our email server. We got sliced and diced over the weekend by hackers. So expect plenty of questions this week.) Thanks for the previous API call & function Matthew works b


basic_string comparison -
Is there a way to compare strings that is case insensitive? I know I can compare them using stricmp, but is there an inbuilt method or technique? Thanks in advance HD


Compare strings -
I have seen examples here in the forums, but nothing solid. What is the best why to make sure two (in my case three) strings are indentical? Thanks!


How to compare 2 strings -
Hi! I have a memory block where are many strings, but I cant compare them with a constant string! Example: "if" statement is using sizeof() and its not using strlen() Is there some functions or do I need to make a for loop (which is slow) for checking the data? Code:


5 Questions... -
could you help me to find the solution of the following questions: 1- How many strings of 20 decimal digits are there that contain two 0s, four 1s, three 2s, one 3, two 4s, three 5s, two 7s, and three 9s? 2- How many solutions are there to the inquality: x1 + x2 + x3 £ 11 Wher


How to compare one string to.....HELP!! -
Hello, I'm trying to compare 2 strings(username, and password) to a textfie that I have loaded into my app, via richtextbox. If there is a way to compare it without using the richtextbox that is cool. I have a textfile that has the usernames and accounts of my users in it. I get the


Random integers! -
Hello, I have a question about random integers. My instructions are to write a code that generates a set of random integers, from 0 to 9, and when the numbers reach 0, it stops. Underneath the row of random integers, it should say how many numbers it took to get to 0. How do I


Integers - Position -
I have an integer called "numb" which has the value of 155. Is there a way to split the integer up like you can with strings? With strings you can have substrings. Can I do the same thing with an integer? I need to write a recursive method that writes the value backword


[2005] compare strings -
I'm comparing 2 strings, they happen to be version numbers that have both numbers and letter(s) in the string, how can i tell if 123b is newer than 123a ?


sorting comma delimited strings -
Ok If I have 2 strings : strA = "1,2,3" and strB = "3,2,1" and I compare them they obviously wont equal eachother. However in my logig because they both contain the same 3 numbers I want to be able to say well yes man they do equal eachother. This wo


Comparing texts with missing or extra letters -
Hey all, my problem is when I start to compare two texts with different lenght. The point is that the texts are loaded in two RTB and I don't know how to compare them. I found that I have to parse the strings and then to compare word by word,but it's hard for me because (as default)


Alphanumerical sorting of strings -
Hi all. As you probably know, when you compare strings in VB, "2" is greater than "19". Does anyone know of a function or a routine that would sort alphanumerically without this glitch? Ex: if I compare "PB101" with "PB23", I want "


Comparing strings. -
Hi, need help on comparing strings. Is there any way to compare two strings such that String 1 can remove data in String 1 that already existed in String 2?