src-ed/forth/hello.fs
Ed Braaten fdbb99aeeb Added version info output to Hello Forth World script and
made initial pass at outputing command line arguments.
2015-05-08 23:18:50 -07:00

17 lines
357 B
Forth
Executable file

#! /usr/bin/gforth
\
\ Sample Hello World! Forth script...
\
: 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