Un cours pour se lancer dans la programmation avec le langage Go (golang).
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

72 righe
1.4 KiB

  1. /* Copyright (C) 2011-2023 Patrick H. E. Foubet - E2L Ivry
  2. Ecole du Logiciel Libre : https://e2li.org/
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 3 of the License, or any
  6. later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>
  13. *******************************************************************/
  14. package main
  15. import (
  16. "fmt"
  17. "math"
  18. )
  19. var User string = "E2L !"
  20. type person struct {
  21. int
  22. }
  23. type aint int
  24. const (
  25. BigConst = math.MaxFloat64 * math.MaxFloat64
  26. data aint = 10
  27. )
  28. const (
  29. a0 = iota // 0
  30. a1 = iota // 1
  31. a2 = iota // 2
  32. a3 = iota // 3
  33. )
  34. const (
  35. b0 = iota // 0
  36. b1 // 1
  37. b2 // 2
  38. b3 // 3
  39. )
  40. const (
  41. c0 = iota // 0
  42. c1 = 43
  43. c2 = 75
  44. c3 = iota // 3
  45. )
  46. const d0 = iota //0
  47. const d1 = iota //0
  48. const d2 = iota //0
  49. const d3 = iota //0
  50. func main() {
  51. fmt.Println(a0, a1, a2, a3)
  52. fmt.Println(b0, b1, b2, b3)
  53. fmt.Println(c0, c1, c2, c3)
  54. fmt.Println(d0, d1, d2, d3)
  55. fmt.Println("Vive " + User);
  56. }