<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=Lua%E3%81%A7Queue</id>
	<title>LuaでQueue - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=Lua%E3%81%A7Queue"/>
	<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Lua%E3%81%A7Queue&amp;action=history"/>
	<updated>2026-07-23T01:28:15Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://monobook.org/w/index.php?title=Lua%E3%81%A7Queue&amp;diff=10138&amp;oldid=prev</id>
		<title>2018年8月15日 (水) 06:01にimported&gt;Administratorによる</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Lua%E3%81%A7Queue&amp;diff=10138&amp;oldid=prev"/>
		<updated>2018-08-15T06:01:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2018年8月15日 (水) 06:01時点における版&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-l37&quot;&gt;37行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;37行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[category: Lua]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Administrator</name></author>
	</entry>
	<entry>
		<id>https://monobook.org/w/index.php?title=Lua%E3%81%A7Queue&amp;diff=10137&amp;oldid=prev</id>
		<title>imported&gt;Administrator: ページの作成:「LuaでQueueを使いたい。&lt;syntaxhighlight lang=&quot;lua&quot;&gt; -- Queueクラス Queue = {}  function Queue.new(max)   local obj = { _buff = {}, _count = 0, _max = max or 0 }...」</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Lua%E3%81%A7Queue&amp;diff=10137&amp;oldid=prev"/>
		<updated>2018-08-15T06:00:32Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「LuaでQueueを使いたい。&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; -- Queueクラス Queue = {}  function Queue.new(max)   local obj = { _buff = {}, _count = 0, _max = max or 0 }...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;LuaでQueueを使いたい。&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Queueクラス&lt;br /&gt;
Queue = {}&lt;br /&gt;
&lt;br /&gt;
function Queue.new(max)&lt;br /&gt;
  local obj = { _buff = {}, _count = 0, _max = max or 0 }&lt;br /&gt;
  return setmetatable(obj, {__index = Queue})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Queue:enqueue(x)&lt;br /&gt;
  if self._count &amp;lt; self._max then&lt;br /&gt;
    table.insert(self._buff, x)&lt;br /&gt;
    self._count = self._count + 1&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Queue:dequeue()&lt;br /&gt;
  if self._count &amp;lt;= 0 then&lt;br /&gt;
    return nil&lt;br /&gt;
  else&lt;br /&gt;
    self._count = self._count - 1&lt;br /&gt;
    return table.remove(self._buff, 1)&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Queue:isEmpty()&lt;br /&gt;
  return self._count &amp;lt;= 0&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Queue:count() &lt;br /&gt;
  return self._count&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function Queue:max()&lt;br /&gt;
  return self._max&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Administrator</name></author>
	</entry>
</feed>