Documentation corrections to use targetlang formatting

This commit is contained in:
William S Fulton 2017-07-30 17:02:47 +01:00
commit c454f2ce2f

View file

@ -411,7 +411,7 @@ void print_array(double x[10]);
Now, in a scripting language, you might write this: Now, in a scripting language, you might write this:
</p> </p>
<div class="code"> <div class="targetlang">
<pre> <pre>
a = new_doubleArray(10) # Create an array a = new_doubleArray(10) # Create an array
for i in range(0, 10): for i in range(0, 10):
@ -475,7 +475,7 @@ void print_array(double x[10]);
Allows you to do this: Allows you to do this:
</p> </p>
<div class="code"> <div class="targetlang">
<pre> <pre>
import example import example
c = example.doubleArray(10) # Create double[10] c = example.doubleArray(10) # Create double[10]
@ -801,7 +801,7 @@ target language. In other words, if you were using a language like Tcl,
and you wrote this, and you wrote this,
</p> </p>
<div class="code"> <div class="targetlang">
<pre> <pre>
% foo Hello % foo Hello
</pre> </pre>
@ -852,7 +852,7 @@ size_t parity(char *str, size_t len, size_t initial);
Now, in the target language, you can use binary string data like this: Now, in the target language, you can use binary string data like this:
</p> </p>
<div class="code"> <div class="targetlang">
<pre> <pre>
&gt;&gt;&gt; s = "H\x00\x15eg\x09\x20" &gt;&gt;&gt; s = "H\x00\x15eg\x09\x20"
&gt;&gt;&gt; parity(s, 0) &gt;&gt;&gt; parity(s, 0)