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

Are strings allowed to extend for multiple lines? #22

Open
pushfoo opened this issue Jul 1, 2020 · 5 comments
Open

Are strings allowed to extend for multiple lines? #22

pushfoo opened this issue Jul 1, 2020 · 5 comments
Labels
C3/DS Creatures 3 / Dockingstation related CAOS CAOS Programming Language

Comments

@pushfoo
Copy link
Member

pushfoo commented Jul 1, 2020

Something like this:

outs "first line
second line"
@pushfoo pushfoo added C3/DS Creatures 3 / Dockingstation related CAOS CAOS Programming Language labels Jul 1, 2020
@ligfx
Copy link

ligfx commented Jul 1, 2020

openc2e doesn't support multi-line strings (or bytestrings), would be interesting if the actual engine does

@caoscontroller
Copy link

Creatures 1 allows multiline string literals

@pushfoo
Copy link
Member Author

pushfoo commented Jul 10, 2020

@caoscontroller ty, noted. The issue is tagged with c2e rather than c1, but it's still useful.

@pushfoo
Copy link
Member Author

pushfoo commented Jul 11, 2020

@ligfx tl;dr: string literals can be valid in c2e caos, but the newlines get replaced at some point between parsing and display

Executing over the direct interface on lc2e seems to convert newlines into spaces. cat testfile | pyc2e inject (pyc2e) with this file:

outs "

test

new"

yielded the following output:

 test new

I can't seem to get ject to produce recognizable output, but running ject from within the CAOS console seems to be failing in general at the moment under lc2e. I may have forgotten how to use it properly, or I might have broken my install. I'll check in with discord to figure out what i'm doing wrong.

@pushfoo
Copy link
Member Author

pushfoo commented Jul 11, 2020

lc2e exhibits the same behavior for multi-line literals when injecting using ject as it does when fed the script though the port interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C3/DS Creatures 3 / Dockingstation related CAOS CAOS Programming Language
Projects
None yet
Development

No branches or pull requests

3 participants