开发者

Factor shebangs

开发者 https://www.devze.com 2023-03-29 01:33 出处:网络
According to Hyperpolyglot, Factor should accept shebangs. But on my system Factor can\'t handle shebangs.

According to Hyperpolyglot, Factor should accept shebangs. But on my system Factor can't handle shebangs.

Specs: Factor v0.94, Mac OS X 1开发者_如何转开发0.7

$ cat hello.factor 

\#!/usr/bin/env factor

USE: io
IN: hello

: hello ( -- ) "Hello World!" print ;

MAIN: hello

$ ./hello.factor 

./hello.factor

1: #!/usr/bin/env factor
                 ^
No word named “#!/usr/bin/env” found in current vocabulary search path


Just a guess, but the web page shows a space after the #!:

#! /usr/bin/env factor

If that doesn't work, it's likely that Hyperpolyglot got this wrong (or perhaps it refers to a different version or implementation of factor).

Amusingly, when I try the example on my system (Ubuntu), I get:

/usr/bin/factor: `./hello.factor' is not a valid positive integer

but that's because /usr/bin/factor is the GNU coreutils utility that factors numbers into primes. 8-)}

0

精彩评论

暂无评论...
验证码 换一张
取 消