Timeline for Tips for golfing in D2
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 28, 2016 at 1:50 | comment | added | cat | @dev-null actually, POSIX only supports exit codes up to 255. I don't know about Windows, but on Unix / Linux an exit code over 255 wraps around, because of overflow. | |
| Feb 28, 2016 at 1:48 | comment | added | Andreas Louv | Usually you are allowed to return / output the most convenient way for your language. But I guess D only support exit codes from 0-255? | |
| Feb 28, 2016 at 1:45 | comment | added | cat | @dev-null however, yes, in that case that it should not be written to stdout but returned, it would be shorter | |
| Feb 28, 2016 at 1:45 | comment | added | cat | @dev-null if the question asks for a full program writing an integer to stdout then import std.stdio;void main(){write(7);} is what's needed. I doubt a question would mandate the program return a number because many languages can't set return codes | |
| Feb 28, 2016 at 1:44 | comment | added | Andreas Louv | If the question ask to output an integer wouldn't int main(){return output} be shorter? | |
| Feb 28, 2016 at 0:13 | history | answered | cat | CC BY-SA 3.0 |