view interps/cfunge/cfunge-src/tests/refc-invalid-deref.b98 @ 11321:14314c55571e

<FireFly> ` echo "$(cat wisdom/fonts) , FireFly\'s fonts http://xen.firefly.nu/up/fonts/ & https://twitter.com/FireyFly/status/899965577481129984" >/tmp/a && cp /tmp/a wisdom/fonts && cat wisdom/fonts
author HackBot
date Mon, 15 Jan 2018 22:31:52 +0000
parents 859f9b4339e6
children
line wrap: on
line source

v >0a"CFER oN" >:#,_@            ; This program tests invalid D in REFC ;
>#^"CFER"4(nv
v           <
>1. #v 0D  "DAB" >:#,_  @        ; Derefence 0 ;
     >a"DOOG">:#,_v
v                 <


>2. #v 01-D  "DAB" >:#,_  @      ; Derefence negative ;
     >a"DOOG">:#,_v
v                 <


>3. 45+ #v D  "DAB" >:#,_  @     ; Derefence postive ;
         >a"DOOG">:#,_v
v                     <


>4. #v nD  "DAB" >:#,_  @        ; Derefence on empty stack ;
     >a"DOOG">:#,_v
v                 <

a                                ; That's all ;
,
@