P4_ENVIRONMENT_Q(3)

NAME
p4_environment_Q - ENVIRONMENT? ( a1 n1 -- false | ?? true )

SYNOPSIS

#include <pfe/environ-ext.h>

_export p4_char_t* p4_environment_Q((const p4_char_t* str, p4cell l));

DESCRIPTION

check the environment for a property, usually a condition like questioning the existance of specified wordset, but it can also return some implementation properties like "WORDLISTS" (the length of the search-order) or "#LOCALS" (the maximum number of locals)

Here it implements the environment queries as a SEARCH-WORDLIST in a user-visible vocabulary called ENVIRONMENT

      : ENVIRONMENT?
        ['] ENVIRONMENT &gt;WORDLIST SEARCH-WORDLIST
        IF  EXECUTE TRUE ELSE  FALSE THEN ;

special extension: a search for CORE will also find a definition of CORE-EXT or CORE-EXT-EXT or CORE-EXT-EXT-EXT - it just has to be below the ansi-standard maximum length of 31 chars.

if a name like "dstrings-ext" is given, and no such entry can be found, then envQ will try to trigger a (LOADM) of that module, in the hope that this implicit-load does in fact define the answer. Use with care, it's a very new feature.

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>