Name

scratch — return content of the named scratch variable

ATTRIBUTES

Attribute Pos. Req. Default Description
name Yes Yes Name of the scratch variable.
filter Filter to apply to the value.
keep 0 Keep variable value in memory intact, and only apply filter for display?
interpolate     0 interpolate output?
hide     0 Hide the tag return value?

DESCRIPTION

The tag returns value of the named scratch variable.

BEHAVIOR

This tag does not appear to be affected by, or affect, the rest of Interchange.

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

Scratch variables cannot be set using the [scratch] tag; see scratch glossary entry for a complete discussion.

AVAILABILITY

scratch is available in Interchange versions:

4.6.0-5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: code/SystemTag/scratch.coretag
Lines: 24


# Copyright 2002-2007 Interchange Development Group and others
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.  See the LICENSE file for details.
# 
# $Id: scratch.coretag,v 1.6 2007-03-30 23:40:49 pajamian Exp $

UserTag scratch             Order        name
UserTag scratch             PosNumber    1
UserTag scratch             addAttr
UserTag scratch             Version      $Revision: 1.6 $
UserTag scratch             Routine      <<EOR
sub {
my ($var, $opt) = @_;
my $value = $::Scratch->{$var};
if($opt->{filter}) {
  $value = filter_value($opt->{filter}, $value, $var);
  $::Scratch->{$var} = $value unless $opt->{keep};
}
  return $value;
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

scratchd(7ic), tmpn(7ic), value(7ic), seti(7ic), tmp(7ic), set(7ic)

DocBook! Interchange!