Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/src/cmd/4th/lib/rdepth.4th

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


\ 4tH library - RDEPTH - Copyright 2005 J.L. Bezemer
\ You can redistribute this file and/or modify it under
\ the terms of the GNU General Public License

[UNDEFINED] R.S [IF]
\ Return stack counterpart of DEPTH
\ Note the STACK-CELLS correction is there to hide RDEPTH itself
                                       ( -- n)
: RDEPTH STACK-CELLS -2 [+] CELLS RP@ - ;

\ Return stack counterpart of .S
\ Note the : R.S R> .. >R ; sequence is there to hide R.S itself
                                       ( --)
: R.S R> CR RDEPTH DUP 0> IF DUP
  BEGIN DUP WHILE R> -ROT 1- REPEAT DROP DUP
  BEGIN DUP WHILE ROT DUP . >R 1- REPEAT DROP
  THEN ." (TORS) " DROP >R ;
[THEN]


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].