Skip to content

Commit

Permalink
Implement $*PROGRAM_NAME. Patch courtesy of Martin Berends (mberends++).
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Mar 14, 2009
1 parent 03f2d29 commit 6d97951
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/builtins/guts.pir
Expand Up @@ -339,8 +339,10 @@ first). So for now we just transform multis in user code like this.

start_main:
## We're running as main program
## Remove program argument (0) and set up @ARGS global
## Remove program argument (0) and put it in $*PROGRAM_NAME, then set up
## @ARGS global.
$P0 = shift args
set_hll_global '$PROGRAM_NAME', $P0
args = args.'Array'()
set_hll_global '@ARGS', args
## run unitmain
Expand Down

0 comments on commit 6d97951

Please sign in to comment.