Narcissist: Difference between revisions
m
→{{header|Phix}}: missing /, or type it in
m (→{{header|Phix}}: missing /, or type it in) |
|||
(7 intermediate revisions by 5 users not shown) | |||
Line 41:
false
error "User cancelled." number -128</syntaxhighlight>
=={{header|Arturo}}==
<syntaxhighlight lang="arturo">blk:[print (("blk:" ++ (as .code blk) ++ "do blk") = input "") ? -> "accept" -> "reject"]do blk</syntaxhighlight>
{{out}}
<pre>$ arturo narcissist.art < narcissist.art
accept</pre>
=={{header|AutoHotkey}}==
Line 210 ⟶ 218:
=={{header|J}}==
<syntaxhighlight lang="j">#!/
main=:3 : 0 NB. tested under j602
self=: '#!/j602/bin/jconsole',LF,'main=:',(5!:5<'main'),LF,'main''''',LF
echo self -: stdin''
Line 408 ⟶ 416:
=={{header|Phix}}==
<!--
<syntaxhighlight lang="phix">
printf(1,"\n\n%t\n\n",get_text(command_line()[2],GT_LF_LAST)[1]=gets(0))
{{out}}
Can be run using <code>p test.exw < test.exw</code> or the input manually typed in
<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 source code file.</small>
=={{header|PicoLisp}}==
Line 538 ⟶ 554:
1: 1
</pre>
=={{header|RPL}}==
« LASTARG RCL →STR == » '<span style="color:blue">NARCISSIST</span>' STO
"« LASTARG RCL →STR == »" '<span style="color:blue">NARCISSIST</span>' EVAL <span style="color:grey">@ returns 1</span>
"string" '<span style="color:blue">NARCISSIST</span>' EVAL <span style="color:grey">@ returns 0</span>
=={{header|Ruby}}==
Translation of the C version.
Line 671 ⟶ 692:
=={{header|Wren}}==
<syntaxhighlight lang="
import "io" for File, Stdin, Stdout
|