mirror of https://github.com/noisymime/Arduino.git
Merge pull request #4613 from adouglass/patch-1
Fix tutorial typos in 08.Strings/StringAdditionOperator/StringAdditionOperator
This commit is contained in:
commit
b8f3d2d8bb
|
@ -23,7 +23,7 @@ void setup() {
|
||||||
; // wait for serial port to connect. Needed for native USB port only
|
; // wait for serial port to connect. Needed for native USB port only
|
||||||
}
|
}
|
||||||
|
|
||||||
stringOne = String("stringThree = ");
|
stringOne = String("You added ");
|
||||||
stringTwo = String("this string");
|
stringTwo = String("this string");
|
||||||
stringThree = String();
|
stringThree = String();
|
||||||
// send an intro:
|
// send an intro:
|
||||||
|
@ -34,11 +34,11 @@ void setup() {
|
||||||
void loop() {
|
void loop() {
|
||||||
// adding a constant integer to a string:
|
// adding a constant integer to a string:
|
||||||
stringThree = stringOne + 123;
|
stringThree = stringOne + 123;
|
||||||
Serial.println(stringThree); // prints "stringThree = 123"
|
Serial.println(stringThree); // prints "You added 123"
|
||||||
|
|
||||||
// adding a constant long interger to a string:
|
// adding a constant long interger to a string:
|
||||||
stringThree = stringOne + 123456789;
|
stringThree = stringOne + 123456789;
|
||||||
Serial.println(stringThree); // prints " You added 123456789"
|
Serial.println(stringThree); // prints "You added 123456789"
|
||||||
|
|
||||||
// adding a constant character to a string:
|
// adding a constant character to a string:
|
||||||
stringThree = stringOne + 'A';
|
stringThree = stringOne + 'A';
|
||||||
|
|
Loading…
Reference in New Issue