<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.povray.org/content?action=history&amp;feed=atom&amp;title=Reference_Talk%3ADeclare_and_Local_Directives</id>
	<title>Reference Talk:Declare and Local Directives - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.povray.org/content?action=history&amp;feed=atom&amp;title=Reference_Talk%3ADeclare_and_Local_Directives"/>
	<link rel="alternate" type="text/html" href="https://wiki.povray.org/content?title=Reference_Talk:Declare_and_Local_Directives&amp;action=history"/>
	<updated>2026-04-27T14:17:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.povray.org/content?title=Reference_Talk:Declare_and_Local_Directives&amp;diff=8927&amp;oldid=prev</id>
		<title>Jholsenback: preserving some markup</title>
		<link rel="alternate" type="text/html" href="https://wiki.povray.org/content?title=Reference_Talk:Declare_and_Local_Directives&amp;diff=8927&amp;oldid=prev"/>
		<updated>2016-12-13T17:59:58Z</updated>

		<summary type="html">&lt;p&gt;preserving some markup&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;p&amp;gt;preserving some deleted markup:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;{{New}} in version 3.7.1: To circumvent the pitfalls of identifier name collisions,&lt;br /&gt;
two pseudo-functions are provided to specifically refer to identifiers&lt;br /&gt;
at either the global or the most local scope:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IDENTIFIER:&lt;br /&gt;
  GLOBAL_IDENTIFIER | LOCAL_IDENTIFIER | GENERIC_IDENTIFIER&lt;br /&gt;
GLOBAL_IDENTIFIER:&lt;br /&gt;
  global ( GENERIC_IDENTIFIER )&lt;br /&gt;
LOCAL_IDENTIFIER:&lt;br /&gt;
  local ( GENERIC_IDENTIFIER )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Both pseudo-functions can be used anywhere an identifier is allowed.&lt;br /&gt;
They do not simply retrieve the cooresponding value, but refer to the&lt;br /&gt;
identifiers themselves, allowing for constructs like the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#ifdef(local(Foo))&lt;br /&gt;
  #declare global(Foo) = Foo;&lt;br /&gt;
#else&lt;br /&gt;
  #undef global(Foo)&lt;br /&gt;
#end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This example tests whether the identifier &amp;lt;code&amp;gt;Foo&amp;lt;/code&amp;gt; is in use&lt;br /&gt;
at the most local scope, and if so, copies its value to the global variable&lt;br /&gt;
of the same name; otherwise, it discards any value the global variable may&lt;br /&gt;
have held before.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jholsenback</name></author>
	</entry>
</feed>