ASCII extract - how?

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Post Reply
skartalov
Posts: 37
Joined: Fri Apr 09, 2010 10:50 am
Location: BULGARIA

ASCII extract - how?

Post by skartalov » Mon Feb 25, 2013 12:34 pm

Someone please help!

I have string variable named "TEXT" and byte variable named "I".

what code shound I write to get the ASCII of the first letter of the "TEXT" string to "I"?

Thanks!

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Mon Feb 25, 2013 1:06 pm

Code: Select all

Dim TEXT As String
Dim I As Byte
TEXT = "Hello"

I = TEXT(0) // = "H"
I = TEXT(1) // = "e"
and so on...

skartalov
Posts: 37
Joined: Fri Apr 09, 2010 10:50 am
Location: BULGARIA

Post by skartalov » Mon Feb 25, 2013 3:56 pm

Thanks a lot! That worked... so easy :-)

Post Reply