4.2. Scratch

User scratch variables are initialized whenever a new user session is created. They start with whatever is defined in the ScratchDefault directive in catalog.cfg; otherwise they are not defined.

  Access in ITL with           Attributes
  -----------------------      -------------------
  [scratch varname]            Displays
  [scratchd varname]           Displays and deletes

  Embedded Perl                From
  -----------------------      -------------------
  $Scratch->{varname}          Accessor
  $Session->{scratch}{varname} Equivalent

They can be set in several ways:

  Set in ITL with              Attributes
  -----------------------      -------------------
  [set varname]VAL[/set]       Sets to VAL, no interpretation of ITL inside
  [seti varname]VAL[/seti]     Sets to VAL, interprets ITL inside
  [tmpn varname]VAL[/tmpn]     Sets to VAL, no ITL interpretation, temporary
  [tmp  varname]VAL[/tmp]      Sets to VAL, interprets ITL inside, temporary

  Embedded Perl                From
  -----------------------      -------------------
  $Scratch->{varname} = 'VAL'; Sets to VAL
  $Tag->tmp(varname);          Set as temporary, must set value afterwards.