Message Boards Message Boards

0
|
6348 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

[?] Typo in FAST INTRODUCTION FOR PROGRAMMERS - Strings section?

Posted 6 years ago

In the check your understanding section there is an option:

StringReplace["lead",_"gold"]  

with the following explanation:

"This replaces each letter separately, resulting in goldgoldgoldgold, instead of making just one replacement of the whole string.".

However, what you get (see attached) is:

gold is not a valid string replacement rule.

Attachments:
POSTED BY: Samuel Kohn
2 Replies
Posted 6 years ago

Pretty stupid of me. Thank you. I will try being more careful before commenting next time. Thank you.

POSTED BY: Samuel Kohn

When I go to that section, http://www.wolfram.com/language/fast-introduction-for-programmers/en/strings/, I don't see StringReplace["lead",_"gold"], which isn't valid syntax. I see StringReplace["lead",_ -> "gold"]

POSTED BY: Jason Biggs
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract