P4_POCKET_PAD(3)

NAME
p4_pocket_pad - POCKET-PAD ( -- pocket-ptr ) [FTH]

SYNOPSIS

#include <pfe/misc-ext.h>

FCode p4_pocket_pad(---);

DESCRIPTION

The p4_pocket_pad function Returns the next pocket. A pocket has usually the size of a maxstring, see ENVIRONMENT /STRING (but can be configured to be different, mostly when MAXPATH > /STRING ) Note that a pocket is a temporary and forth internal functions do sometimes call POCKET-PAD too, especially when building filenames and getting a literal (but temporary) string from the keyboard. Functions are not expected to hold references to this transient area any longer than building a name and calling another word with it.

Usage of a pocket pad is a good way to make local temporary buffers superfluous that are only used to construct a temporary string that usually gets swallowed by another function.

      depracated code:
        create temp-buffer 255 allot
        : make-temp ( str buf )
               temp-buffer place  " .tmp" count temp-buffer append
               temp-buffer count make-file ;
      replace with this:
        : make-temp ( str buf )
             pocket-pad &gt;r
             r place  " .tmp" count r append
             r&gt; count make-file
        ;

AUTHOR

    • Guido U. Draheim (modified by $Author: guidod $)

COPYRIGHT

Copyright (C) Tektronix, Inc. 1998 - 2001. Copyright (C) 2005 - 2008 Guido U. Draheim <guidod@gmx.de>