Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted (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 by DR00ME

"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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...