From 8262abdea18cdb873b2012411bfebe131fb37d52 Mon Sep 17 00:00:00 2001 From: Nic Gaffney Date: Wed, 28 Jun 2023 18:46:36 -0500 Subject: std --- examples/arguments.sloth | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 examples/arguments.sloth (limited to 'examples/arguments.sloth') diff --git a/examples/arguments.sloth b/examples/arguments.sloth new file mode 100644 index 0000000..3e44dcc --- /dev/null +++ b/examples/arguments.sloth @@ -0,0 +1,9 @@ +fn main(argc: Int, argv: [String]) Int { + if argc == 2 { + print("The argument supplied is "); + println(argv); + } else { + println("Wrong # of args"); + } + return 0; +} -- cgit v1.2.3