<div dir="ltr">Well, it&#39;s not really what I want as it still has a custom function (READ). I think it&#39;s not possible in Swift. It&#39;s alright, let&#39;s move on. Thank you, anyway. :)<div><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 12, 2015 at 3:37 PM, David Turnbull via swift-users <span dir="ltr">&lt;<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I couldn&#39;t figure out a way to bring back line numbers but here&#39;s READ and DATA...<div><br></div><div><p style="margin:0px;font-size:12px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">// Define your data</p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:Menlo"><span style="color:rgb(187,44,162)">let</span> DATA = [<span style="color:rgb(39,42,216)">5</span>,<span style="color:rgb(39,42,216)">7</span>,<span style="color:rgb(39,42,216)">1</span>,<span style="color:rgb(39,42,216)">6</span>,<span style="color:rgb(39,42,216)">7</span>]</p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">// Change the Int below to whatever type of DATA you have</p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:Menlo"><span style="color:rgb(187,44,162)">let</span> READ = {() -&gt; () -&gt; <span style="color:rgb(112,61,170)">Int</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:Menlo">    <span style="color:rgb(187,44,162)">in</span> <span style="color:rgb(187,44,162)">var</span> g=<span style="color:rgb(79,129,135)">DATA</span>.<span style="color:rgb(61,29,129)">generate</span>();<span style="color:rgb(187,44,162)">return</span> {()<span style="color:rgb(187,44,162)">in</span> <span style="color:rgb(187,44,162)">return</span> g.<span style="color:rgb(61,29,129)">next</span>()!}}()</p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)">// And now you read</p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:Menlo"><span style="color:rgb(61,29,129)">print</span>( <span style="color:rgb(79,129,135)">READ</span>() )</p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:Menlo"><span style="color:rgb(61,29,129)">print</span>( <span style="color:rgb(79,129,135)">READ</span>() + <span style="color:rgb(79,129,135)">READ</span>() )</p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:Menlo"><span style="color:rgb(61,29,129)">print</span>( <span style="color:rgb(79,129,135)">READ</span>() * <span style="color:rgb(79,129,135)">READ</span>() )</p><p style="margin:0px;font-size:12px;line-height:normal;font-family:Menlo"><br></p><div>It&#39;s like magic and stuff.</div><div><br></div>-david</div><span class=""><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 10:46 PM, Bee via swift-users <span dir="ltr">&lt;<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>Does anyone here remember gwbasic? There is one feature of gwbasic that I miss from modern programming language. It&#39;s the pair of READ function and DATA statement. An example here: <a href="http://www.antonis.de/qbebooks/gwbasman/data.html" target="_blank">http://www.antonis.de/qbebooks/gwbasman/data.html</a></div><div><div><br></div><div><br></div></div></div></blockquote></div></div></span></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=kPpE8prjils5Te4T0SIbdBbrHkMvwDTrNPlEKlqAfI6T3Jd0MpNQn14Arg-2B2h1sMpRu80uBhKNa8kVza-2Fu2Es2RW6uG43HC7DsHQk9VvVerV1f38gvdzUEZ4kGidf7MJVbJfqJkdSzcAyqdFpRX734orUGR7pdKnrkjNfUR1Ns1anI1cJeHH7t88O9s-2F81xyUpoZfZmTJ-2FIuBWQ71iBdCzchezDAoT5kG-2BFuN4YgqxY-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important">
<br>_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>-Bee-<br><br></div></div></div>
</div></div></div>