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

print: display string in REPL without quotation marks #1664

Open
martin-henz opened this issue Apr 10, 2024 · 2 comments
Open

print: display string in REPL without quotation marks #1664

martin-henz opened this issue Apr 10, 2024 · 2 comments
Labels
minor less important than important but more than nice-to-have Proposal Proposing a feature, please discuss

Comments

@martin-henz
Copy link
Member

martin-henz commented Apr 10, 2024

Currently

display(1.5, "abc")

prints:

abc 1.5

and

display("cde", abc")

prints:

abc: "cde"

This works quite well, with the exception that sometimes, I want to display a (possibly multi-line) string without quotation marks, and without a value coming after it. I propose that we introduce print(string):

print("**********************************************\n*** the program entered the main algorithm ***"\n*********************************************")

should just display

**********************************************
*** the program entered the main algorithm ***
**********************************************

without quotation marks.

@martin-henz martin-henz added minor less important than important but more than nice-to-have Proposal Proposing a feature, please discuss labels Apr 10, 2024
@martin-henz martin-henz changed the title display/error: special treatment of undefined as first of two arguments display/error: special treatment of undefined as first of two arguments Apr 10, 2024
@RichDom2185
Copy link
Member

RichDom2185 commented Apr 10, 2024

obsolete:

What happens if we want to display the actual value undefined?

@martin-henz
Copy link
Member Author

martin-henz commented Apr 10, 2024

obsolete:

What happens if we want to display the actual value undefined?

A small hack would be needed:

display(value, "the value is:" + (is_undefined(value) ? " undefined" : ""))

@martin-henz martin-henz changed the title display/error: special treatment of undefined as first of two arguments print: display string in REPL without quotation marks Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor less important than important but more than nice-to-have Proposal Proposing a feature, please discuss
Projects
None yet
Development

No branches or pull requests

2 participants