Narcissist: Difference between revisions

Content added Content deleted
m (→‎{{header|Phix}}: added output and interpreted/compiled remark)
Line 418: Line 418:
<!--(notonline)-->
<!--(notonline)-->
<syntaxhighlight lang="phix">
<syntaxhighlight lang="phix">
printf(1,"\n\n%t\n\n",get_text(command_line()[2],GT_LF_LAST)[$]=gets(0))
printf(1,"\n\n%t\n\n",get_text(command_line()[2],GT_LF_LAST)[1]=gets(0))
</syntaxhighlight>
</syntaxhighlight>
{{out}}
<small>Aside: I suppose there should really be a leading <code>without js -- file i/o</code>, but I wanted to keep it a 1-liner. Prints "true" or "false".</small>
Can be run using <code>p test.exw < test.exw</code>
<pre>
true
</pre>
<small>Aside: I suppose there should really be a leading <code>without js -- file i/o</code>, but I wanted to keep it a 1-liner.<br>
Interpreted-only, as is: to allow a compiled version to run, change <code>command_line()[2]</code> to (say) <code>"test.exw"</code><br>
or maybe <code>substitute(command_line()[2],".exe",".exw")<code>, and ship with/install the src file.</small>


=={{header|PicoLisp}}==
=={{header|PicoLisp}}==