: How to quote programming code in AP Style? 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
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.
More posts by @Welton431
: How to write a character misinterpreting Four Candles as Fork Handles English is full of homophones that can cause confusion when speaking, but if the two similar sounding words are spelled differently
: How does one evaluate his own writing ability? I'm considering working in writing. I'd like to save myself some time in case I'm not up for the job. How do I go about evaluating myself
1 Comments
Sorted by latest first Latest Oldest Best
I don't believe this is specifically covered by AP style. My personal approach would be to present the code in a block quote. (Or, if it's something really short, just a different font face.) But you're not going to find a "rule" that everybody follows for this situation. It's really up to the individual publisher.
Terms of Use Privacy policy Contact About Cancellation policy © selfpublishingguru.com2024 All Rights reserved.