sms.flush documentation issue

Hi all,

the documentation of the GSM / flush() function says :

(...) flush() clears the modem memory of any sent messages once all outgoing characters have been sent.

Yet, the SMS receiver sketch provided in the Arduino IDE as example of GSM use clearly presents that same function as a way to clear modem memory from received SMS :

    // delete message from modem memory
    Serial.println("MESSAGE DELETED");

Shouldn't this be corrected in the documentation ?
Or does flush() actually wipe out the modem memory only when a text messages has been first sent?


The first statement is a compound statement. Something happens (sent messages are deleted from memory) only after something else happens (any pending messages have actually been sent).

If there are no messages in the queue to be sent, then the sent messages are deleted immediately.

I don't see a conflict.

Ok, my bad, I didn't get this, thank you.