let.ion 584 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. let a = 5
  2. echo $a
  3. let a b = 10 $a
  4. echo $a
  5. echo $b
  6. let a b c = 1 2 3
  7. echo $a
  8. echo $b
  9. echo $c
  10. let a b c = "one two" "three four" "five six"
  11. echo $a
  12. echo $b
  13. echo $c
  14. let a = 1;
  15. let a += 4
  16. echo $a
  17. let a *= 5
  18. echo $a
  19. let a /= 4
  20. echo $a
  21. let a[] b c[] = [one two] three [four five]
  22. echo @a
  23. echo $b
  24. echo @c
  25. let a b c = 6 3 5
  26. echo $a $b $c
  27. let a b c -= 2 2 4
  28. echo $a $b $c
  29. let x y z = 1 2 3
  30. let x y z = $z $x $y
  31. echo $x $y $z
  32. let x y z = 1 2 3
  33. let z x y = $y $z $x
  34. echo $x $y $z
  35. let a = [
  36. one # a comment
  37. two # another comment
  38. three
  39. four five six
  40. ]
  41. echo $join(a "\n")