bell notificationshomepageloginNewPostedit profile

Topic : Re: How to structure a sentence containing long code examples? In the context of a technical manual, I need to write instructions guiding users through several standard manipulations. When providing - selfpublishingguru.com

10% popularity

In my opinion, any answer looks messy. One "sentence" with capitals halfway through bugs me; so does a line starting without a capital.

Personally, I would restructure the entire thing to avoid the issue entirely:

Example 1

Currently, line 57 of camera.py looks like this:

camera.start_recording('foo.h264', quantization=25)


In this line, the parameter quantization needs to be replaced with
quality, giving us this:

camera.start_recording('foo.h264', quality=25)

Example 2

Look at Figure 1 below. Our code currently contains line (1); we need
to replace it with line (2).

(1) camera.start_recording('foo.h264', quantization=25)

(2) camera.start_recording('foo.h264', quality=25)


Figure 1 - Two versions of line 57 of the code in camera.py

(Obviously I don't know your code file name, line numbers, or programming language. Substitute where necessary. "camera.py" can be replaced with Example 1 if you're taking that route.)


Load Full (0)

Login to follow topic

More posts by @Kimberly114

0 Comments

Sorted by latest first Latest Oldest Best

Back to top