Skip to content

Conversation

NicoHood
Copy link
Contributor

See https://github.com/arduino/Arduino/issues/3546

Example code:

  Serial.println("1",  "2", 6, "3"," Word " , "4", '!', "5");
  Serial.println();
  Serial.println(44, 44, 44);
  Serial.println();
  Serial.println(44, HEX);
  Serial.println();

// this produces the same flash size:
  // Serial.println("1", "2", "3", "4", "5");
  Serial.println("1");
  Serial.println("2");
  Serial.println("3");
  Serial.println("4");
  Serial.println("5");

@Chris--A
Copy link
Contributor

//If you input only two integers the formatted
// Functions have higher priority

There is a lot of ambiguity as the second parameter means two different things depending on the total number of items, rather than the type of inputs. This should be modified to allow standard overload selection/deduction semantics.

One method of fixing this requires the formatting elements to be enums which will remove all ambiguity.

@facchinm facchinm added the Print and Stream class The Arduino core library's Print and Stream classes label Jan 20, 2017
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Print and Stream class The Arduino core library's Print and Stream classes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants