Ace Master Posted February 20, 2004 Posted February 20, 2004 Hi. I know how to find a char in my string but I don't know how to make this: I receive a string , and in that string I want to know if the last char is ">" or "?" ..and to make decisions. How I make to see the last char in string ? thanks Quote
TechnoTone Posted February 20, 2004 Posted February 20, 2004 myString.EndsWith("X") Quote TT (*_*) There are 10 types of people in this world; those that understand binary and those that don't.
Ace Master Posted February 20, 2004 Author Posted February 20, 2004 Thanks... In the same way as I know the last char ....it is some way to find the char in front of him ???? something like : myString.EndsWith-1("X") it is possible ? thanks Quote
Administrators PlausiblyDamp Posted February 20, 2004 Administrators Posted February 20, 2004 myString.SubString(mystring.length-2,1) should do it Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Ace Master Posted February 20, 2004 Author Posted February 20, 2004 thanks. one more thing .... I have 2 functions. public sub function1 () code 1... check in function2 code2.... end sub public sub function2 () if a>b then code2 line end if end sub basicaly I want to read the code 1 in F1 and after that to check the if in F2 and if it's true to continue with code 2 in F1. I have a serial connection. I send a command for receiving the info but I don't want to send the next command until the receiving for the first one is done. I realy don't know how to do this in other way :( thanks Quote
DR00ME Posted February 20, 2004 Posted February 20, 2004 (edited) public sub function1 () code 1... if function2() then code2.... end if end sub public function function2 () as boolean if a>b then return true else return false end if end function something like this ? I just threw it...might got typos... Edited February 20, 2004 by DR00ME Quote "Everything should be made as simple as possible, but not simpler." "It's not that I'm so smart , it's just that I stay with problems longer ." - Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.