Talk:SmileBASIC (Petit Computer 3)/@comment-74.215.250.244-20140515005456/@comment-173.72.38.64-20140515163126

There is a fairly simple model that would allow for something like this. I'm thinking of INKEY$ as an example... keyboard events can happen at any time, and any time you read the variable, the most recent status is reported.

Negotiations for a connection between two 3DSs could be handled like the current file transfer, then maybe there's a system variable TX$ (or array TX$(n) for multiple connections) and variable RX$ (or array RX$(n)). When the program writes to TX$, it immediately gets transmitted (or, perhaps the contents of TX$ is transmitted at regular intervals), and when the program reads from RX$, it will get the latest transmission received.

At least, that might be the way *I*'d make a first stab at fitting network communications into SmileBasic.