Formatting changes to the cheat-sheet
This commit is contained in:
parent
85db9271ee
commit
cbd4d86acd
|
@ -153,7 +153,7 @@ char* s = "Hello World.";
|
|||
char s0 = s[0]; // 'H'
|
||||
char *t = s; // Pointer to s
|
||||
s[11] = '!';
|
||||
// s and t are both "Hello World."
|
||||
// s and t both "Hello World!"
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -162,7 +162,8 @@ var s: string = "Hello World."
|
|||
var s0: char = s[0] # 'H'
|
||||
var t = s # Copy of s
|
||||
s[11] = '!'
|
||||
# s is "Hello World!", t is "Hello World."
|
||||
# s is "Hello World!"
|
||||
# t is "Hello World."
|
||||
</pre>
|
||||
</td>
|
||||
<td><b>Strings and char</b>. Strings are pass-by-value (copied on assignment) and strictly bounds-checked on access.</i>
|
||||
|
|
Loading…
Reference in New Issue