File:  [gforth] / gforth / ec / nesting.fs
Revision 1.1: download - view: text, annotated - select for diffs
Sat May 2 21:34:06 1998 UTC (25 years, 11 months ago) by pazsan
Branches: MAIN
CVS tags: HEAD
Mega-Patch; added directories

\ nesting.fs displays nesting for primitive trace	12jun97jaw

Variable nestlevel

: main
  cr
  0 nestlevel !
  BEGIN
	key dup 9 u> WHILE
	dup
	CASE	': OF 	cr nestlevel @ spaces 1 nestlevel +! emit ENDOF
		'; OF	cr -1 nestlevel +! nestlevel @ spaces emit 
			cr nestlevel @ spaces ENDOF
		dup OF	dup 31 u> IF emit THEN ENDOF
	ENDCASE
  REPEAT drop bye ;	

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>