Skip to content
Snippets Groups Projects
Commit a16d6253 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

ajouts divers

parents 202b8686 0f1c1288
Branches
No related tags found
No related merge requests found
Pipeline #
...@@ -21,16 +21,18 @@ REVEALOPRIONS += -V width="1500" -V height="1500" -V margin=0 -V center=false ...@@ -21,16 +21,18 @@ REVEALOPRIONS += -V width="1500" -V height="1500" -V margin=0 -V center=false
REVEALOPRIONS += -V include-after="<script src="js/playRust.js"></script> \ REVEALOPRIONS += -V include-after="<script src="js/playRust.js"></script> \
<script src="js/remote-code.js"></script> \ <script src="js/remote-code.js"></script> \
<script src="js/remote-diagrams.js"></script> \ <script src="js/remote-diagrams.js"></script> \
<script src="js/em-artiste.js"></script>" <script src="js/em-artiste.js"></script> \
# REVEALOPRIONS += -V header-includes="<link rel="stylesheet" href="reveal.js/lib/css/zenburn.css" >\ <script src="js/em-artiste.js"></script> \
# <link rel="stylesheet" href="reveal.js/css/theme/simple.css" id="theme">\ <script src="reveal.js/plugin/highlight/highlight.js"></script>"
# <link rel="stylesheet" href="css/console.css" id="theme">\ REVEALOPRIONS += -V header-includes="<link rel="stylesheet" href="reveal.js/lib/css/zenburn.css" >\
# <script src="jquery/dist/jquery.min.js"></script>" <link rel="stylesheet" href="reveal.js/css/theme/simple.css" id="theme">\
<link rel="stylesheet" href="css/console.css" id="theme">\
<script src="jquery/dist/jquery.min.js"></script>"
REVEALOPRIONS += --section-divs REVEALOPRIONS += --section-divs
# REVEALOPRIONS += -V fontsize=tiny # REVEALOPRIONS += -V fontsize=tiny
REVEALOPRIONS += -V slideNumber=true REVEALOPRIONS += -V slideNumber=true
REVEALOPRIONS += --slide-level=1 REVEALOPRIONS += --slide-level=1
# REVEALOPRIONS += --highlight-style espresso REVEALOPRIONS += --highlight-style espresso
REVEALOPRIONS += --self-contained REVEALOPRIONS += --self-contained
SVG=$(wildcard figs/*.svg) SVG=$(wildcard figs/*.svg)
......
---
title: Cours de programmation séquentielle
subtitle: Types avancés
author: Orestis Malaspinas
<!-- date: 25 avril 2018 -->
sansfont: Sans Serif
<!-- header-includes:
<link rel="stylesheet" href="reveal.js/lib/css/zenburn.css" >
<link rel="stylesheet" href="reveal.js/css/theme/simple.css" id="theme">
<link rel="stylesheet" href="css/console.css" id="theme">
<script src="jquery/dist/jquery.min.js"></script> -->
<!-- <script src="reveal.js/lib/js/classList.js"></script> -->
<!-- <script src="reveal.js/plugin/zoom-js/zoom.js"></script> -->
<!-- <script src="reveal.js/plugin/highlight/highlight.js"></script> -->
<!-- <script src="js/remote-diagrams.js"></script> -->
<!-- <script src="reveal.js/plugin/notes/notes.js"></script> -->
<!-- include-after:
<script src="js/playRust.js"></script>
<script src="js/remote-code.js"></script>
<script src="js/remote-diagrams.js"></script>
<script src="js/em-artiste.js"></script> -->
<!-- slide-numbers: true -->
---
# $N$-uplets
## `Tuples`{.rust}
- Un $n-$tuplet est une *collection* ordonnée de $n$ objets.
- Permet de regrouper plusieurs valeurs avec différents types dans un type composé.
<pre><code data-trim="hljs rust" class="lang-rust">
fn main() {
let tuple: (f64, char, usize) = (1.0, 'c', 18usize); // type pas nécessaire
println!("Un tuple {:?}", tuple); // affichage Debug
let sans_type_tuple = (666, "abcdef"); // type inféré
println!("Un autre tuple {:?}", sans_type_tuple); // affichage Debug
}
</code></pre>
## Destructuration
# Vecteurs statiques
## Array{.rust}
# Vecteurs dynamiques
## Vec{.rust}
# Structures
## `Struct`{.rust}
- Une structure est un type
# Types énumérés
## `Enum`{.rust}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment