4 ms·
> A program is not required to produce an output and is not even required to finish. What use is a program if it doesn't have a way of outputting? That is the
by thethirdone 7y ago
> A program is not required to produce an output and is not even required to finish.
What use is a program if it doesn't have a way of outputting?
That is the one requirement from the video I support.
- 29athrowaway 7y agoThe program "sleep" produces output (an exit code, or version) but its purpose is to introduce a delay.
- thethirdone 7y agoI would say having an observable state of running vs not could be considered output. If you could start sleep, but not tell when it finished, it would be quite useless. So I think requiring "output" for a programming language is fine. You just have to be very general about what "output" is.
- obphusckate 7y agoNot the best example. The exit code it produces is exactly how it works: "The exit status is allowed to be zero when sleep is interrupted by the SIGALRM signal because most implementations of this utility rely on the arrival of that signal to notify them that the requested finishing time has been successfully attained." http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sleep.html http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sl...