Post History
I would like to put the following code in an article that is written in AP Style: puts 'Hello, world!' How do I do this? If I were to put the code (C++, Ruby, whatever) in an article that was wr...
#3: Attribution notice added
Source: https://writers.stackexchange.com/q/25405 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision
I would like to put the following code in an article that is written in AP Style: puts 'Hello, world!' How do I do this? If I were to put the code (C++, Ruby, whatever) in an article that was written in a newspaper, how would I write it? Is the entire thing surrounded by quotes, brackets, etc? How do you deal with line breaks? I didn't find any help in [this guide](https://rads.stackoverflow.com/amzn/click/0465082998).