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

Likely simple bugs to fix in the format/2-3 predicates #37

Closed
pmoura opened this issue Jun 4, 2023 · 4 comments
Closed

Likely simple bugs to fix in the format/2-3 predicates #37

pmoura opened this issue Jun 4, 2023 · 4 comments

Comments

@pmoura
Copy link

pmoura commented Jun 4, 2023

Bug in the implementation of ~c (code): the following calls are expected to print an A:

| ?- format("~c", [65]).

yes
| ?- format('~c', [65]).

yes

Bug in the implementation of ~i (ignore): the following calls are expected to omit the middle argument and thus print ac:

| ?- format("~a~i~a", [a,b,c]).
ab

yes
| ?- format('~a~i~a', [a,b,c]).
ab

yes
@spabreu
Copy link
Collaborator

spabreu commented Jun 4, 2023 via email

@pmoura
Copy link
Author

pmoura commented Jun 4, 2023

Hi Salvador.

Interesting. But other Prolog systems don't require a call to flush_output/0 (or flush_output/1 for format/3 calls).

@pmoura
Copy link
Author

pmoura commented Jun 4, 2023

Additionally, the test definition implicitly closes the output stream, which is expected to flush any pending output.

didoudiaz added a commit that referenced this issue Jun 7, 2023
modify pl-state handling (and related built-in)
add consult/2
upodate doc
@pmoura
Copy link
Author

pmoura commented Jun 7, 2023

Fixes confirmed. Thanks!

@pmoura pmoura closed this as completed Jun 7, 2023
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

No branches or pull requests

2 participants