help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] shebang for language that does not use # for comment


From: Peng Yu
Subject: [Help-bash] shebang for language that does not use # for comment
Date: Tue, 3 Jul 2012 16:34:17 -0500

Hi,

For languages that do not use # as commend symbol, I have some trouble
for using the shebang line (see the annoy error message). Since the
shebang line is not supposed to be used by the interpreter why not
strip it off before the file is passed to the interpreter?

>From gp's manual.
2.13.2 /*...*/: comment. Everything between the stars is ignored by
gp. These comments can
span any number of lines.
2.13.3 \\: one-line comment. The rest of the line is ignored by gp.


~/linux/test/gp$ cat main.gp
#!/usr/bin/env gp

\p 212
(1.378-0.09143*I)^(14.87+0.3721*I)


~/linux/test/gp$ ./main.gp
                                                             GP/PARI
CALCULATOR Version 2.5.1 (released)
                                                     i386 running
darwin (x86-64/GMP-5.0.4 kernel) 64-bit version
                                                   compiled: Jul  3
2012, gcc-4.2.1 (Apple Inc. build 5666) (dot 3)
                                                            (readline
v6.2 enabled, extended help enabled)


Copyright (C) 2000-2011 The PARI Group

PARI/GP is free software, covered by the GNU General Public License,
and comes WITHOUT ANY WARRANTY WHATSOEVER.

Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.

parisize = 8000000, primelimit = 500509
  ***   syntax error, unexpected '/': #!/usr/bin/envgp
  ***                                   ^--------------
... skipping file './main.gp'
   realprecision = 231 significant digits (212 digits displayed)
%1 = 
80.817082637557070449383034933010288336925078193546211741027496566803185110925792657439929206283145167399627244460426678862453227164569661204139651873272488827365261487845201056199035423784093096984005713791800191
- 
94.838461889186304973351271821601500916571303364865064205039706592481303045713982306764332644305117525157057688587100513820353771954974829340172391797575388246887990680136241031895212412150770309289450962931402933*I


-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]