From fdbb99aeeb7e1de41f52c47bfc8da66677c6c91b Mon Sep 17 00:00:00 2001 From: Ed Braaten Date: Fri, 8 May 2015 23:18:50 -0700 Subject: [PATCH] Added version info output to Hello Forth World script and made initial pass at outputing command line arguments. --- forth/hello.fs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/forth/hello.fs b/forth/hello.fs index f5118ef..3ce247e 100755 --- a/forth/hello.fs +++ b/forth/hello.fs @@ -3,5 +3,15 @@ \ Sample Hello World! Forth script... \ -.( Hello Forth World! ) cr +: verinfo s" git describe --abbrev=7 --dirty --always --tags" system ; + +\ Obligatory Hello World with some version info +.( Hello Forth World! Version: ) verinfo cr + +\ Show list of command line arguments +: printargs + argc @ 0 do i arg type cr loop ; +.( Command line args: ) cr +printargs + bye