bell notificationshomepageloginNewPostedit profile

Topic : 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 - selfpublishingguru.com

10.01% popularity

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.


Load Full (1)

Login to follow topic

More posts by @Welton431

1 Comments

Sorted by latest first Latest Oldest Best

10% popularity

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.


Load Full (0)

Back to top