Print itself: Difference between revisions
m
→{{header|Phix}}
(added Perl programming solution) |
|||
Line 65:
=={{header|Phix}}==
Interpreted only:
<lang Phix>puts(1,get_text(command_line()[2]))</lang>
{{out}}
<pre>
puts(1,get_text(command_line()[2]))
</pre>
Interpreted or compiled - latter only works while executable and source are still in the same directory, and not renamed.
<lang Phix>puts(1,get_text(substitute(command_line()[2],".exe",".exw")))</lang>
{{out}}
Line 72 ⟶ 77:
>p test ;; or p -c test
puts(1,get_text(substitute(command_line()[2],".exe",".exw")))
</pre>
Alternative - see the docs (ie phix.chm) for an explanation of the ("") and [1][2]:
<lang Phix>?get_text(include_path("")&include_files()[1][2])</lang>
{{out}}
<pre>
"?get_text(include_path("")&include_files()[1][2])"
</pre>
|