manipulating strings

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Post Reply
rubenpena
Registered User
Registered User
Posts: 32
Joined: Sun Mar 25, 2007 2:07 am
Location: Monterrey,Mexico

manipulating strings

Post by rubenpena » Fri Feb 01, 2008 10:41 pm

Dear friends:
I am trying of understand the logic of strings manipulations:

Code: Select all

Device = 18F452
Clock = 8
Config OSC = HSPLL
INCLUDE "String.BAS"
Include "SUART.bas"
Include "convert.bas"
Dim Value As String // default is 23 chars
DIM Index AS BYTE
DIM Name AS STRING(10)
SetTX(PORTC.6)
SetRX(PORTC.7)
SetBaudrate(sbr1200)
SetMode(umTrue)
While true
   UART.Read(Value)    'I send the string "abcdefghijk"
   Name = Left(value,3)' I am trying to copy the first 3 chars in Name
   UART.Write(VALUE,13,10) 'print the Value string "abcdefghijk"...OK..
   UART.Write(name,13,10)  'print the Name string "abc" ... DO not Work...
Wend
[b]
Where can I find some examples of this...?
Thanks in advance...
Ruben de la Pena V
[/b]

Post Reply