une suite d instructions executees dans un ordre clair.
atelier
F Sharp
parcours pratique pour apprendre F Sharp depuis zero
definition d abord
ce que signifie F Sharp
F Sharp sert a ecrire des instructions precises. Ici tu l abordes comme parcours pratique pour apprendre F Sharp depuis zero. Commence par une idee simple: des entrees passent par des etapes et deviennent une sortie.
script.fsxexecuter dotnet fsi script.fsxhabitude apprends une petite piece de F Sharp, tape un exemple minimal et execute-leune valeur est une donnee. Une variable est le nom qui la garde.
un petit travail nomme qui recoit une entree et produit un resultat.
.NET SDK execute le code de script.fsx.
premier code lisible
sortie du programme
entry point output syntax printfnprintfn "%d" 42
sortie 42lignee du langage
arbre de F Sharp
vois d ou vient F Sharp, quels langages sont proches, et quoi apprendre ensuite.
parcours debutant
Banque de questions
Chercher puis pratiquer
Choisis une etape ou cherche dans la banque de ce langage puis ouvre l exercice.
F Sharp question 1
F Sharp question 1. Choisis l explication qui correspond le mieux a afficher une valeur.
F Sharp question 2
F Sharp question 2. Choisis l explication qui correspond le mieux a nommer une valeur.
F Sharp question 3
F Sharp question 3. Choisis l explication qui correspond le mieux a fonction reutilisable.
F Sharp question 4
F Sharp question 4. Choisis l explication qui correspond le mieux a collection de base.
F Sharp question 5
F Sharp question 5. Choisis l explication qui correspond le mieux a afficher une valeur.
F Sharp question 6
F Sharp question 6. Choisis l explication qui correspond le mieux a nommer une valeur.
F Sharp question 7
F Sharp question 7. Choisis l explication qui correspond le mieux a fonction reutilisable.
F Sharp question 8
F Sharp question 8. Choisis l explication qui correspond le mieux a collection de base.
F Sharp question 9
F Sharp question 9. Choisis l explication qui correspond le mieux a afficher une valeur.
F Sharp question 10
F Sharp question 10. Choisis l explication qui correspond le mieux a nommer une valeur.
F Sharp question 11
F Sharp question 11. Choisis l explication qui correspond le mieux a fonction reutilisable.
F Sharp question 12
F Sharp question 12. Choisis l explication qui correspond le mieux a collection de base.
F Sharp question 13
F Sharp question 13. Choisis l explication qui correspond le mieux a afficher une valeur.
F Sharp question 14
F Sharp question 14. Choisis l explication qui correspond le mieux a nommer une valeur.
F Sharp question 15
F Sharp question 15. Choisis l explication qui correspond le mieux a fonction reutilisable.
F Sharp question 16
F Sharp question 16. Choisis l explication qui correspond le mieux a collection de base.
F Sharp question 17
F Sharp question 17. Choisis l explication qui correspond le mieux a afficher une valeur.
F Sharp question 18
F Sharp question 18. Choisis l explication qui correspond le mieux a nommer une valeur.
choix multiple
F Sharp question 1
F Sharp question 1. Choisis l explication qui correspond le mieux a afficher une valeur.
printfn "%d" 42
reference
modeles pour script.fsx
dotnet fsi script.fsxentry point output syntax printfn
sortie du programme
printfn "%d" 42
- Run the smallest file first
- Print one known value
- Check the output before adding more code
variables assignment types let
valeurs et noms
let total = 42 printfn "%d" total
- Give values readable names
- Keep one idea per line while learning
- Trace the value before changing it
function collection List
fonctions et collections
let add a b = a + b let scores = [40; 2] printfn "%d" scores.Length
- Keep functions small
- Return useful values
- Use the common collection before reaching for frameworks