Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enabling printf style output method with variadic arguments#29

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
aentinger wants to merge1 commit intoarduino:masterfromaentinger:feature/Serial.printf
Closed

Enabling printf style output method with variadic arguments#29

aentinger wants to merge1 commit intoarduino:masterfromaentinger:feature/Serial.printf

Conversation

aentinger
Copy link
Contributor

Usage example:

voidsetup() {  Serial.begin(9600);}staticint loop_cnt =0;voidloop() {  Serial.printf  ("[%d]",millis());   Serial.printfln("Loop Cnt %d", loop_cnt);  loop_cnt++;delay(1000);  }

Output:

[0] Loop Cnt 0[999] Loop Cnt 1[199] Loop Cnt 2...

The function can't be namedprint because in this case its signature overlaps withsize_t print(const char[]) (No variadic arguments is a legimitate use case).

@aentingeraentinger marked this pull request as ready for reviewMarch 19, 2019 12:02
@CLAassistant
Copy link

CLAassistant commentedApr 9, 2021
edited
Loading

CLA assistant check
All committers have signed the CLA.

@matthijskooijman
Copy link
Collaborator

This seems like a duplicate of#28, which IMHO has a better implementation that has no fixed-size buffer. So I'm going to go ahead and close this PR, to keep things a bit more tidy (also since this feature is a bit controversial, as discussed in#32 and#28).

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@aentinger@CLAassistant@matthijskooijman@per1234

[8]ページ先頭

©2009-2025 Movatter.jp