Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
rust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orestis.malaspin
rust
Commits
18b5224b
There was a problem fetching the pipeline summary.
Commit
18b5224b
authored
6 years ago
by
orestis.malaspin
Browse files
Options
Downloads
Patches
Plain Diff
amelioration makefile
parent
846d1bd8
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+16
-7
16 additions, 7 deletions
Makefile
types.md
+12
-3
12 additions, 3 deletions
types.md
with
28 additions
and
10 deletions
Makefile
+
16
−
7
View file @
18b5224b
...
@@ -35,20 +35,29 @@ REVEALOPRIONS += --self-contained
...
@@ -35,20 +35,29 @@ REVEALOPRIONS += --self-contained
SVG
=
$(
wildcard figs/
*
.svg
)
SVG
=
$(
wildcard figs/
*
.svg
)
PNG
=
$(
SVG:%.svg
=
%.png
)
PNG
=
$(
SVG:%.svg
=
%.png
)
MD
=
$(
wildcard
*
.md
)
HTML
=
$(
MD:%.md
=
%.html
)
all
:
$(PNG) intro.html variables.html types.html
all
:
$(PNG) $(HTML)
figs/%.png
:
figs/%.svg
figs/%.png
:
figs/%.svg
convert
\-
flatten
$<
$@
convert
\-
flatten
$<
$@
intro
.html
:
intro
.md Makefile
%
.html
:
%
.md Makefile
pandoc
-s
$(
REVEALOPRIONS
)
-o
$@
$<
pandoc
-s
$(
REVEALOPRIONS
)
-o
$@
$<
variables.html
:
variables
.md Makefile
# intro.html: intro
.md Makefile
pandoc
-s
$(
REVEALOPRIONS
)
-o
$@
$<
#
pandoc -s $(REVEALOPRIONS) -o $@ $<
types.html
:
types.md Makefile
# variables.html: variables.md Makefile
pandoc
-s
$(
REVEALOPRIONS
)
-o
$@
$<
# pandoc -s $(REVEALOPRIONS) -o $@ $<
# types.html: types.md Makefile
# pandoc -s $(REVEALOPRIONS) -o $@ $<
# control.html: control.md Makefile
# pandoc -s $(REVEALOPRIONS) -o $@ $<
clean
:
clean
:
rm
-rf
intro.html variables.html types
.html
rm
-rf
*
.html
This diff is collapsed.
Click to expand it.
types.md
+
12
−
3
View file @
18b5224b
...
@@ -48,7 +48,7 @@ sansfont: Sans Serif
...
@@ -48,7 +48,7 @@ sansfont: Sans Serif
## Les entiers (1/3)
## Les entiers (1/3)
-
Il existe
4
tailles d'entiers (8, 16, 32,
et 64
bits) qui viennent en signé ou non-signé.
-
Il existe
5
tailles d'entiers (8, 16, 32,
64, et 128
bits) qui viennent en
*
signé
*
ou
*
non-signé
*
.
-
Également en taille dépendant de l'architecture
-
Également en taille dépendant de l'architecture
-
`isize`
{.rust} entier signé 32 ou 64 bits.
-
`isize`
{.rust} entier signé 32 ou 64 bits.
-
`usize`
{.rust} entier non-signé 32 ou 64 bits.
-
`usize`
{.rust} entier non-signé 32 ou 64 bits.
...
@@ -64,6 +64,8 @@ sansfont: Sans Serif
...
@@ -64,6 +64,8 @@ sansfont: Sans Serif
+---------------+---------------+--------------------+
+---------------+---------------+--------------------+
| 64 bits |
`i64`
{.rust} |
`u64`
{.rust} |
| 64 bits |
`i64`
{.rust} |
`u64`
{.rust} |
+---------------+---------------+--------------------+
+---------------+---------------+--------------------+
| 128 bit |
`i128`
{.rust} |
`u128`
{.rust} |
+---------------+---------------+--------------------+
| 32 ou 64 bits |
`isize`
{.rust}|
`usize`
{.rust} |
| 32 ou 64 bits |
`isize`
{.rust}|
`usize`
{.rust} |
+---------------+---------------+--------------------+
+---------------+---------------+--------------------+
...
@@ -97,8 +99,6 @@ fn main() {
...
@@ -97,8 +99,6 @@ fn main() {
## Les entiers (3/3)
## Les entiers (3/3)
-
En mode
*debug*
, un dépassement d'entier produira une erreur à l'exécution.
-
En mode
*debug*
, un dépassement d'entier produira une erreur à l'exécution.
-
**Attention**
: En mode
*release*
, cela ne sera pas le cas.
<pre><code
data-trim=
"hljs rust"
class=
"lang-rust"
>
<pre><code
data-trim=
"hljs rust"
class=
"lang-rust"
>
fn main() {
fn main() {
let x = 12341324;
let x = 12341324;
...
@@ -107,6 +107,15 @@ fn main() {
...
@@ -107,6 +107,15 @@ fn main() {
println!("L'entier x vaut {}.", (x*y) as i32); // affichage
println!("L'entier x vaut {}.", (x*y) as i32); // affichage
}
}
</code></pre>
</code></pre>
-
**Attention**
: En mode
*release*
, cela ne sera pas le cas.
<pre><code
data-trim=
"hljs rust"
class=
"lang-rust"
>
fn main() {
let x:i32 = 1234567891011; // en pratique cela produit un warning
println!("L'entier x vaut {}.", x); // affichage
}
</code></pre>
## Les nombres à virgule flottante
## Les nombres à virgule flottante
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment