diff options
Diffstat (limited to 'public/post/rust-basic/index.html')
-rw-r--r-- | public/post/rust-basic/index.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/public/post/rust-basic/index.html b/public/post/rust-basic/index.html index 45bebfc..e7d9d0a 100644 --- a/public/post/rust-basic/index.html +++ b/public/post/rust-basic/index.html @@ -58,13 +58,13 @@ I will use C to compare with since I familiar it.</p> </blockquote> <p>There are a bunch of built-in types we can work with: <em>scalar types</em> and <em>compound types</em>. -Those scalar types are just alike as C language. -| scalar types | rust | c | -| ------------- |------------- | ------- | -| integer | i(u)8/i16/i32(default)/i64 | (unsigned) char/short/int/long | -| float | f32/f64(default) | float/double | -| boolean | true/false | True/False (non-zero/zero) | -| character | char | char |</p> +Those scalar types are just alike as C language.</p> +<table><thead><tr><th>scalar types</th><th>rust</th><th>c</th></tr></thead><tbody> +<tr><td>integer</td><td>i(u)8/i16/i32(default)/i64</td><td>(unsigned) char/short/int/long</td></tr> +<tr><td>float</td><td>f32/f64(default)</td><td>float/double</td></tr> +<tr><td>boolean</td><td>true/false</td><td>True/False (non-zero/zero)</td></tr> +<tr><td>character</td><td>char</td><td>char</td></tr> +</tbody></table> <p>The compound types are a bit different. rust provides many hands-on types where C type is not the same or needs to define explicitly.</p> <table><thead><tr><th>compound type</th><th>rust</th><th>c</th></tr></thead><tbody> <tr><td>struct</td><td>same</td><td>same</td></tr> |