Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

REPLACECHARS and extended ASCII

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
mrak

Bascom Member



Joined: 14 Dec 2005
Posts: 24

poland.gif
PostPosted: Thu Oct 23, 2014 10:06 pm    Post subject: REPLACECHARS and extended ASCII Reply with quote

I'd like to use Replacechars function to exchange in a string some of the text characters (basic ASCII) into the extended characters. A natural way seemed to use the {xxx} notation.

In the example:

Code:

$regfile = "m168def.dat"
$crystal = 8000000

Dim Stemp As String * 20

Stemp = "Hello world"
Replacechars Stemp , "d" , "{255}"
Print Stemp

End
 


the "Hello worl{" string is generated as the output rather than expected string with the extended character at the very end of the string.

I'd like to ensure it is an accidental error in the Replacechars function or this should work intentionally in this way.


Thank you in advance for your answer!

makarak

(BASCOM-AVR version : 2.0.7.7 )
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5208
Location: Holland

blank.gif
PostPosted: Thu Oct 23, 2014 10:14 pm    Post subject: Reply with quote

it seems that this statement does not support {}. I will change that.
you can also specify the byte value : Replacechars Stemp , "d" , 255

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum