<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.inspired-lua.org/index.php?action=history&amp;feed=atom&amp;title=var.storeAt</id>
	<title>var.storeAt - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.inspired-lua.org/index.php?action=history&amp;feed=atom&amp;title=var.storeAt"/>
	<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/index.php?title=var.storeAt&amp;action=history"/>
	<updated>2026-05-10T23:11:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://wiki.inspired-lua.org/index.php?title=var.storeAt&amp;diff=736&amp;oldid=prev</id>
		<title>Adriweb: /* Syntax */</title>
		<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/index.php?title=var.storeAt&amp;diff=736&amp;oldid=prev"/>
		<updated>2012-06-07T12:00:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Syntax&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 12:00, 7 June 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l28&quot; &gt;Line 28:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 28:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;u&amp;gt;&amp;lt;center&amp;gt;column&amp;lt;/center&amp;gt;&amp;lt;/u&amp;gt; || number || 1-based column number of the matrix or list.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;u&amp;gt;&amp;lt;center&amp;gt;column&amp;lt;/center&amp;gt;&amp;lt;/u&amp;gt; || number || 1-based column number of the matrix or list.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;u&amp;gt;&amp;lt;center&amp;gt;row&amp;lt;/center&amp;gt;&amp;lt;/u&amp;gt; || number || ''(Optional)'' 1-based row number. ''row'' is only required when &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;recalling &lt;/del&gt;a value &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;from &lt;/del&gt;a matrix.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| &amp;lt;u&amp;gt;&amp;lt;center&amp;gt;row&amp;lt;/center&amp;gt;&amp;lt;/u&amp;gt; || number || ''(Optional)'' 1-based row number. ''row'' is only required when &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;storing &lt;/ins&gt;a value &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;to &lt;/ins&gt;a matrix.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Adriweb</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.inspired-lua.org/index.php?title=var.storeAt&amp;diff=735&amp;oldid=prev</id>
		<title>Adriweb: Created page with &quot;__NOTOC__  var.'''storeAt''' is a function that is part of the Var library.&lt;br /&gt;  Stores a numeric value into an element of a math list or matrix with the give...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.inspired-lua.org/index.php?title=var.storeAt&amp;diff=735&amp;oldid=prev"/>
		<updated>2012-06-07T12:00:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__  var.&amp;#039;&amp;#039;&amp;#039;storeAt&amp;#039;&amp;#039;&amp;#039; is a function that is part of the &lt;a href=&quot;/Category:var&quot; title=&quot;Category:var&quot;&gt;Var&lt;/a&gt; library.&amp;lt;br /&amp;gt;  Stores a numeric value into an element of a math list or matrix with the give...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
var.'''storeAt''' is a function that is part of the [[:Category:var|Var]] library.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stores a numeric value into an element of a math list or matrix with the given name. &lt;br /&gt;
&lt;br /&gt;
The value must be numeric. Any other type will raise an error. &amp;lt;br /&amp;gt;&lt;br /&gt;
New values can be appended to a list by storing to one column past the end of the list.&amp;lt;br /&amp;gt;&lt;br /&gt;
This function is particularly useful as an optimization when adding new values to a list during a simulation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Returns nil on success or &amp;quot;cannot store&amp;quot; if the value cannot be stored at the given index.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Since|3.2}}&lt;br /&gt;
&lt;br /&gt;
== Syntax  ==&lt;br /&gt;
var.'''storeAt'''(name, numericValue, column [,row]) &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;u&amp;gt;&amp;lt;center&amp;gt;name&amp;lt;/center&amp;gt;&amp;lt;/u&amp;gt; || string || Name of the variable to grab from&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;u&amp;gt;&amp;lt;center&amp;gt;numericValue&amp;lt;/center&amp;gt;&amp;lt;/u&amp;gt; || number || The numeric value to be stored.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;u&amp;gt;&amp;lt;center&amp;gt;column&amp;lt;/center&amp;gt;&amp;lt;/u&amp;gt; || number || 1-based column number of the matrix or list.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;u&amp;gt;&amp;lt;center&amp;gt;row&amp;lt;/center&amp;gt;&amp;lt;/u&amp;gt; || number || ''(Optional)'' 1-based row number. ''row'' is only required when recalling a value from a matrix.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example  ==&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;var.store(&amp;quot;mat&amp;quot;, {{1,2}, {3,4}}) -- create matrix mat in the symbol table&lt;br /&gt;
var.storeAt(&amp;quot;mat&amp;quot;, 13.3, 1, 1) -- puts the number 13.1 into the field 1,1 of the matrix&lt;br /&gt;
val = var.recallAt(&amp;quot;mat&amp;quot;, 1, 1) -- grab it back in lua&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Good to know ==&lt;br /&gt;
Routines [[var.recallAt]] and [[var.storeAt]] will work with matrices but only if they are created by some other means ([[var.store]]) :&lt;br /&gt;
&lt;br /&gt;
== See also  ==&lt;br /&gt;
*[[var.recallAt]]&lt;br /&gt;
*[[var.makeNumericList]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:var]]&lt;/div&gt;</summary>
		<author><name>Adriweb</name></author>
		
	</entry>
</feed>