<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Variable</title><link>https://sourceforge.net/p/hpg-projects/wiki/Variable/</link><description>Recent changes to Variable</description><atom:link href="https://sourceforge.net/p/hpg-projects/wiki/Variable/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 20 Jan 2023 12:24:49 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/hpg-projects/wiki/Variable/feed" rel="self" type="application/rss+xml"/><item><title>Variable modified by Hugh Greene</title><link>https://sourceforge.net/p/hpg-projects/wiki/Variable/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Variables are generally use for representing data in computer languages.&lt;br/&gt;
They are used to represent certain things like the number of apples a&lt;br/&gt;
player has or his current score, locations of objects and other things&lt;br/&gt;
like that. EDL supports some of the lower levels ones from GML such as&lt;br/&gt;
the ones below, including regular C++ data types, such as boolean true&lt;br/&gt;
or false and floating point integer values.&lt;/p&gt;
&lt;p&gt;In &lt;a class="" href="/p/hpg-projects/wiki/ENIGMA/" title="wikilink"&gt;ENIGMA&lt;/a&gt; and &lt;a class="" href="/p/hpg-projects/wiki/Game_Maker/" title="wikilink"&gt;Game Maker&lt;/a&gt;,&lt;br/&gt;
variables come in several different flavors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="" href="/p/hpg-projects/wiki/Constant/" title="wikilink"&gt;Constant&lt;/a&gt; - All objects may read its value.&lt;br/&gt;
    The value never changes. Because of this, a constant isn't&lt;br/&gt;
    technically a variable, but it is included here for completeness.&lt;/li&gt;
&lt;li&gt;&lt;a class="" href="/p/hpg-projects/wiki/Global/" title="wikilink"&gt;Global&lt;/a&gt; - All objects and instances may access&lt;br/&gt;
    and change the variable. If one object changes the variable, other&lt;br/&gt;
    objects will see the new value. Global variables come in three&lt;br/&gt;
    types: predefined, global flagged, and global &lt;a class="" href="../dot_access" title="wikilink"&gt;dot&lt;br/&gt;
    access&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a class="" href="/p/hpg-projects/wiki/Global_local/" title="wikilink"&gt;Global local&lt;/a&gt; - All objects and instances&lt;br/&gt;
    already have these variables defined, but each instance has a local&lt;br/&gt;
    copy. If one instance changes the variable, only that instance will&lt;br/&gt;
    see the new value, while other objects and instances will see their&lt;br/&gt;
    own value.&lt;/li&gt;
&lt;li&gt;&lt;a class="" href="/p/hpg-projects/wiki/Local/" title="wikilink"&gt;Local&lt;/a&gt; - An object may define these variables,&lt;br/&gt;
    but each instance has a local copy. Other objects will not see the&lt;br/&gt;
    value unless they define it themselves or use &lt;a class="" href="../dot_access" title="wikilink"&gt;dot&lt;br/&gt;
    access&lt;/a&gt; on the variable. If one instance&lt;br/&gt;
    changes the variable, only that instance will see the new value,&lt;br/&gt;
    while other instances will see their own value.&lt;/li&gt;
&lt;li&gt;Typed/&lt;a class="" href="/p/hpg-projects/wiki/Scope/" title="wikilink"&gt;Scoped&lt;/a&gt; - Any variable defined with either&lt;br/&gt;
    the &lt;a class="" href="../var" title="wikilink"&gt;var&lt;/a&gt; keyword or any of the &lt;a class="" href="../data_type" title="wikilink"&gt;data&lt;br/&gt;
    type&lt;/a&gt; keywords becomes a scoped variable. At&lt;br/&gt;
    some point, usually at the end of the script or event that the&lt;br/&gt;
    variable is in, the scoped variable will disappear, meaning that&lt;br/&gt;
    other events cannot access it - called losing scope. This is&lt;br/&gt;
    particularly useful in conserving memory - after the variable loses&lt;br/&gt;
    scope, its memory may be recycled for something else. To prevent a&lt;br/&gt;
    typed variable from losing scope, explicitly flag it as local.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="read-only"&gt;Read Only&lt;/h2&gt;
&lt;p&gt;Various read only variables such as working_directory.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="" href="../File" title="wikilink"&gt;File&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="" href="/p/hpg-projects/wiki/Instance/" title="wikilink"&gt;Instance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="" href="/p/hpg-projects/wiki/Room/" title="wikilink"&gt;Room&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="" href="../Game" title="wikilink"&gt;Game&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugh Greene</dc:creator><pubDate>Fri, 20 Jan 2023 12:24:49 -0000</pubDate><guid>https://sourceforge.net21190630ba96e64e7ebc0cdfabab48c57290cf5f</guid></item></channel></rss>