It is currently Thu May 25, 2017 5:36 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: dollar signs in strings
Unread postPosted: Wed Apr 05, 2017 10:45 am 
Offline

Joined: Sat Dec 26, 2015 8:37 pm
Posts: 30
Let's assume that string T$ contains the following: "A $B".

The following does not work: a$ = word$(T$,1,"$")

But the following does work: a$ = word$(T$,1,"\\$")

Maybe there should be something in the manual to explain that dollar signs cannot be in a string unless preceded by "\\".

Or maybe there should be a complete list of characters that require special attention when placing in strings.

Best regards,
Robert


Top
 Profile  
 
 Post subject: Re: dollar signs in strings
Unread postPosted: Wed Apr 05, 2017 11:57 am 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 656
Location: UK
rrioja wrote:
Let's assume that string T$ contains the following: "A $B".

The following does not work: a$ = word$(T$,1,"$")

But the following does work: a$ = word$(T$,1,"\\$")

Maybe there should be something in the manual to explain that dollar signs cannot be in a string unless preceded by "\\".

Or maybe there should be a complete list of characters that require special attention when placing in strings.

Best regards,
Robert

The problem is not special to dollar signs, but to any significant character in the regular expression syntax. Which is mentioned in the manual. But I agree it could be a little clearer that it is quite complex, or how to avoid it by using only commands that do not use regular expression syntax...

Mike.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
suspicion-preferred