[pmwiki-users] SDV question...

Patrick R. Michaud pmichaud at pobox.com
Fri Sep 22 15:27:37 CDT 2006

On Fri, Sep 22, 2006 at 04:19:18PM -0400, The Editor wrote:
> Sorry to ask a really simple question, but have not used the SDV
> function before.
> If I use this in a recipe, and declare it as global in the various
> functions I need it for, does this mean it can be reset as needed?

Depends on what you mean by "reset as needed".

> And I presume these variables
> are all set before any of the markup processing begins--whether they
> appear in a page, group, or local.config or wherever?

SDV is just a function like any other -- it doesn't have any
magic or spooky "action at a distance" effects.  Writing

   SDV($SomeVar, 'value');

is the same as writing

   if (!isset($SomeVar)) $SomeVar = 'value';

except the SDV version is a lot easier to write.


More information about the pmwiki-users mailing list