<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://hotline.ubersoft.org/Sputnik/wiki/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Using</id>
		<title>Using - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Using"/>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Using&amp;action=history"/>
		<updated>2026-04-05T18:01:31Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Using&amp;diff=4618&amp;oldid=prev</id>
		<title>UberFoX: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Using&amp;diff=4618&amp;oldid=prev"/>
				<updated>2015-06-14T12:37:22Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:37, 14 June 2015&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Using&amp;diff=4617&amp;oldid=prev</id>
		<title>UberFoX: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Using&amp;diff=4617&amp;oldid=prev"/>
				<updated>2014-08-11T21:40:59Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:40, 11 August 2014&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Using&amp;diff=2334&amp;oldid=prev</id>
		<title>UberFoX: Created page with &quot;= Using =  === Description ===  Executes the expressions then runs the code within the statements and finally automatically runs unset() on each expression in the expressions lis...&quot;</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Using&amp;diff=2334&amp;oldid=prev"/>
				<updated>2013-08-15T01:05:33Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Using =  === Description ===  Executes the expressions then runs the code within the statements and finally automatically runs unset() on each expression in the expressions lis...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Using =&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Executes the expressions then runs the code within the statements and finally automatically runs unset() on each expression in the expressions list (Basically cleaning up after you).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
using( &amp;lt;expressions&amp;gt; )&lt;br /&gt;
{&lt;br /&gt;
    statements&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== expressions ====&lt;br /&gt;
&lt;br /&gt;
A list of expressions to execute separated by ,&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Example on a simple string:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $cat = &amp;quot;yyy&amp;quot;; // String exists&lt;br /&gt;
using( $cat ) // using will use the string&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;str is: $cat&amp;quot;); // prints the string just fine&lt;br /&gt;
}&lt;br /&gt;
println(&amp;quot;Final: $cat&amp;quot;); // nothing... the string no longer exists...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example of using it with a class that will be deleted after the using block ends:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
using( $newString = new CString(&amp;quot;meow&amp;quot;) )&lt;br /&gt;
{&lt;br /&gt;
	println(&amp;quot;Hello world!: &amp;quot; . $newString);&lt;br /&gt;
}&lt;br /&gt;
// Immediately after the using block finishes the class gets unset() and its __Destruct will be run.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also stack them example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
my $cat = &amp;quot;yyy&amp;quot;;&lt;br /&gt;
using( $cat, $newString = new CString(&amp;quot;meow&amp;quot;), $coolstring = new CString(&amp;quot;moo&amp;quot;) )&lt;br /&gt;
{&lt;br /&gt;
	// the $cat and both class variables get unset once this block ends&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Function]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	</feed>