Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPLACE statement #95

Merged
merged 2 commits into from
May 15, 2019
Merged

REPLACE statement #95

merged 2 commits into from
May 15, 2019

Conversation

xvxx
Copy link
Collaborator

@xvxx xvxx commented May 14, 2019

This adds the REPLACE statement, which as an unimplemented TODO in the source:

REPLACE $str-expr FROM $str-expr WITH $str-expr IN $str-var

example:

DATA:
string IS text
PROCEDURE:
STORE "Please reject this Pull Request." IN string
REPLACE "reject" FROM string WITH "accept" IN string
DISPLAY string crlf
REPLACE "Pull Request" FROM string WITH "lizard" IN string
REPLACE "accept" FROM string WITH "admire" IN string
REPLACE "." FROM string WITH ": 🦎" IN string
DISPLAY string crlf

output:

Please accept this Pull Request.
Please admire this lizard: 🦎

@Lartu
Copy link
Owner

Lartu commented May 15, 2019

Aw yeah! This is so so so so so wonderful, thank you very much for your awesome contributions!

@Lartu Lartu merged commit f7ade18 into Lartu:master May 15, 2019
@Lartu
Copy link
Owner

Lartu commented May 15, 2019

Please do not forget to document and implement tests for this new feature! (if possible, if you cannot do it just tell me and I'll do it) 😉

@xvxx
Copy link
Collaborator Author

xvxx commented May 15, 2019

@Lartu
Copy link
Owner

Lartu commented May 16, 2019

Haha I love the example! Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants