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

[Bug] No way to print a string without newlines #271

Closed
mks-h opened this issue Jul 4, 2024 · 5 comments · Fixed by #308
Closed

[Bug] No way to print a string without newlines #271

mks-h opened this issue Jul 4, 2024 · 5 comments · Fixed by #308
Labels
bug Something isn't working compiler

Comments

@mks-h
Copy link
Member

mks-h commented Jul 4, 2024

The echo built-in command always prints a newline at the end. There is currently no equivalent to $echo -n$, that prints the string without adding a newline.

@Mte90 Mte90 added the bug Something isn't working label Jul 4, 2024
@b1ek
Copy link
Member

b1ek commented Jul 4, 2024

we should also add a printf builtin or stdlib command, which does not print a newline at the end

@Ph0enixKM
Copy link
Member

@b1ek I’m wondering if this should be a separate command printf or maybe some kind of modifier or argument for echo?

@Mte90
Copy link
Member

Mte90 commented Jul 5, 2024

I think that is better a different command as printf is quite a standard function name and echo has the same bash behavior in this way.

@Ph0enixKM
Copy link
Member

I'd implement printf as print(text: Text): Null standard library function. What do you think?

@CymDeveloppement
Copy link
Member

I'd implement printf as print(text: Text): Null standard library function. What do you think?

i propose printf(format: Text, args: [Text] = []): Null
I'm going to make a pull request

@Mte90 Mte90 changed the title No way to print a string without newlines [Bug] No way to print a string without newlines Jul 19, 2024
@Mte90 Mte90 added the compiler label Jul 19, 2024
@CymDeveloppement CymDeveloppement linked a pull request Jul 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants