GY-63_MS5611/libraries/Set/examples/subsetTest/subsetTest.ino

53 lines
981 B
Arduino
Raw Normal View History

2020-11-27 05:33:55 -05:00
//
// FILE: subsetTest.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo
// DATE: 2014-11-09
// URL: https://github.com/RobTillaart/SET
2021-01-29 06:31:58 -05:00
2020-11-27 05:33:55 -05:00
#include "set.h"
2021-01-29 06:31:58 -05:00
2020-11-27 05:33:55 -05:00
void setup()
{
Serial.begin(115200);
Serial.print("Start set_demo : ");
Serial.println(SET_LIB_VERSION);
Serial.println();
Serial.println("\n\nSubSet test");
Set setE;
for (int i = 0; i < 5; i++) setE.add(i);
Set setF(setE);
Serial.println(setE.count());
Serial.println(setF.count());
Serial.println(setE <= setF?"subset":"no subset");
Serial.println(setF <= setE?"subset":"no subset");
setF.add(6);
Serial.println(setE <= setF?"subset":"no subset");
Serial.println(setF <= setE?"subset":"no subset");
setF.sub(3);
Serial.println(setE <= setF?"subset":"no subset");
Serial.println(setF <= setE?"subset":"no subset");
Serial.println();
2021-01-29 06:31:58 -05:00
Serial.println("\ndone...");
2020-11-27 05:33:55 -05:00
Serial.println();
}
2021-12-28 04:38:33 -05:00
2020-11-27 05:33:55 -05:00
void loop()
{
}
2021-12-28 04:38:33 -05:00
// -- END OF FILE --