: 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
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.)
More posts by @Kimberly114
: Directly quoting a source who also has a cited source When you are directly quoting a source who also has a cited source in the sentence or sentences you are using what is the best course
: Choosing between your Mother Tongue and another language OK, I know I was warned, but what can I do? I had this question for a very long time. I have decided where to write (platform like
Terms of Use Privacy policy Contact About Cancellation policy © selfpublishingguru.com2024 All Rights reserved.