louise
The Louise language: compiler, runtime, std, tooling
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runRéussi#125 · main · 16 min 13 s
0Étoiles
0Forks
40Issues
| 1 | // Process arguments (std/os, issue #179): argv holds at least the |
| 2 | // program's name, and it is not empty. |
| 3 | |
| 4 | import std/io |
| 5 | import std/list |
| 6 | import std/os |
| 7 | import std/string |
| 8 | |
| 9 | pub fn main :: -> () / <io> |
| 10 | { |
| 11 | let argv = os.args () |
| 12 | io.println (show (list.length argv >= 1)) |
| 13 | match argv |
| 14 | { [name, ..] -> io.println (show (string.length name > 0)) |
| 15 | , [] -> io.println "unreachable" |
| 16 | } |
| 17 | } |
| 18 | //> True |
| 19 | //> True |