Cobra Interactive Query Language reset

NAME

reset — clear user-defined marks and ranges

SYNTAX

	r[eset] [all]

DESCRIPTION

This command removes all user-defined marks and reverts them to zero.

By default, user-defined bounds (in the .bounds attribute of tokens) are not cleared. The bounds field can be set for user-defined ranges (extend, stretch, and in user-defined scripts. It is also set by the setlinks command, to define forward jumps for goto, if, else, switch, case, default, and break statements that can be useful for executing control-flow sensitive scripts.
Similarly, the bounds field can be set for variables with the symbols command, to point to the location of the corresponding variable declarations.

To clear also the bounds field, the argument all can be used.

EXAMPLES

	: m /.		# mark all tokens
	84759 matches
	: = "number:"	# print the nr of matches
	number: 84759
	: r		# reset
	: =
	0 matches
	: u		# undo
	: =
	84759 matches
	: r all		# reset all fields, including .bound

SEE ALSO

extend, stretch, mark, undo, print, setlinks, symbols

Return to index
Manual
Tutorial
(Last Updated: 20 May 2019)