<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-AU;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">No, I can’t seem to find a way to do that, but as a
<u>very dodgy</u> workaround, edit the CSV file so that there’s a double comma separating each item and split on that, then you can keep a single comma inside some text<o:p></o:p></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Eg
<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt">1,,WE RUN THE NIGHT,,DJ Havana, Brown,,ISL/UMA<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.5pt;font-family:Consolas;color:blue">Dim</span><span style="font-size:9.5pt;font-family:Consolas"> Values()
<span style="color:blue">As</span> <span style="color:blue">String</span> = Split(strAlbumName,
<span style="color:#A31515">","</span>)<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#376092;mso-style-textfill-fill-color:#376092;mso-style-textfill-fill-alpha:100.0%">Would split everything
normally and allow a comma between Havana and Brown. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="696" style="width:522.0pt">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">Damien Atkinson-Buck</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><br>
Member of Academic Staff (Secondary)</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<div>
<div class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D">
<hr size="2" width="500" style="width:375.0pt" align="left">
</span></div>
</div>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="696" style="width:522.0pt">
<tbody>
<tr>
<td width="164" style="width:123.0pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><a href="http://myivanhoe.net/"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";text-decoration:none"><img border="0" width="200" height="64" id="Picture_x0020_2" src="cid:image001.jpg@01CC10B1.3AFF7DE0" alt="Description: Description: cid:image002.jpg@01CA7D93.5FFD22D0"></span></a><span style="font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
</td>
<td width="5" style="width:3.75pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><span style="font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#1F497D">PO BOX 91 The Ridgeway, Ivanhoe, Victoria 3079 Australia<br>
Telephone +61 3 9490 3848 Facsimile +61 3 9490 3490<br>
</span><a href="mailto:damien.atkinson-buck@ivanhoe.com.au"><span style="font-size:7.5pt;font-family:"Arial","sans-serif"">mailto:damien.atkinson-buck@ivanhoe.com.au</span></a><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#1F497D"><br>
</span><a href="http://myivanhoe.net/"><span style="font-size:7.5pt;font-family:"Arial","sans-serif"">http://myivanhoe.net</span></a><span style="font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Mark KELLY [mailto:kel@mckinnonsc.vic.edu.au]
<br>
<b>Sent:</b> Thursday, 12 May 2011 11:19 AM<br>
<b>To:</b> Year 12 Software Development Teachers' Mailing List<br>
<b>Subject:</b> Re: [Year 12 SofDev] Reading and Writing text data files in VB2010<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">I've just tested it, and Split() does not honour quotation marks: it reads them in with the rest of the text.
<br>
So if a data item contained a comma, it would be seen as a delimiter :-(<o:p></o:p></p>
<div>
<p class="MsoNormal">On 12 May 2011 09:37, ATKINSON-BUCK, Damien <<a href="mailto:Damien.ATKINSON-BUCK@ivanhoe.com.au">Damien.ATKINSON-BUCK@ivanhoe.com.au</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a name="12fe171392d168f9__MailEndCompose"><span style="font-size:11.0pt;color:#1F497D">Mark, thanks for another great tutorial. Building on Marks work might be what you need Trav</span></a><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"> </span><o:p></o:p></p>
<div style="border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt">One of the more common uses of reading a text file is to read various values of a CSV (comma separated values) file, where individual items (think
fields of a flat file database) are read into an array for future processing. Visual Basic has a very nice easy way to do this using the Split function. Imagine that you have the above text file with the following data copied from this week’s Aria charts;</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt">1,WE RUN THE NIGHT,DJ Havana Brown,ISL/UMA</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt">2,FROM THE MUSIC,The Potbelleez,VIC/UMA</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt">3,WHAT HAPPENED TO USJessica Mauboy Feat. Jay Sean,SME</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt">4,DANCE WITH ME,Justice Crew Feat. Flo Rida,SME</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt">5,FRIDAY TO SUNDAY,Justice Crew,SME</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt">6,MAYBE,Sick Puppies,VIR/EMI</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt"> </span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas"> <span style="color:blue">
Dim</span> TextFile <span style="color:blue">As</span> <span style="color:blue">New</span> System.IO.StreamReader(<span style="color:#A31515">"</span></span><span style="font-size:10.0pt;font-family:"Courier New";color:black">u:\albums.txt</span><span style="font-size:9.5pt;font-family:Consolas;color:#A31515">
"</span><span style="font-size:9.5pt;font-family:Consolas">)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas"> <span style="color:blue">
Dim</span> strAlbumName <span style="color:blue">As</span> <span style="color:blue">
String</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas"> strAlbumName = TextFile.ReadLine()</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas"> <span style="color:blue">
Do</span> <span style="color:blue">Until</span> strAlbumName <span style="color:blue">
Is</span> <span style="color:blue">Nothing</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas"> <span style="color:green">
'lstAlbums.Items.Add(strAlbumName)</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas"> <span style="color:blue">
Dim</span> Values() <span style="color:blue">As</span> <span style="color:blue">String</span> = Split(strAlbumName,
<span style="color:#A31515">","</span>)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas"> strAlbumName = TextFile.ReadLine()</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas"> <span style="color:green">
' Values(0) now contains first column value,</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas"> <span style="color:green">
' Values(1) contains second column, etc.</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas"> <span style="color:blue">
Loop</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas"> TextFile.Close()</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none">
<span style="font-size:9.5pt;font-family:Consolas"> TextFile.Dispose()</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D">Cheers</span><o:p></o:p></p>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="696" style="width:522.0pt">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;color:#1F497D">Damien Atkinson-Buck</span></b><span style="font-size:10.0pt;color:#1F497D"><br>
Member of Academic Staff (Secondary)</span><o:p></o:p></p>
<div>
<div>
<div class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D">
<hr size="2" width="500" style="width:375.0pt" align="left">
</span></div>
</div>
</div>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="696" style="width:522.0pt">
<tbody>
<tr>
<td width="164" style="width:123.0pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="http://myivanhoe.net/" target="_blank"><span style="color:windowtext;text-decoration:none"><o:p></o:p></span></a></p>
</td>
<td width="5" style="width:3.75pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none"> </span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:7.5pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none">PO BOX 91 The Ridgeway, Ivanhoe, Victoria
3079 Australia<br>
Telephone +61 3 9490 3848 Facsimile +61 3 9490 3490<br>
</span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><u><span style="font-size:7.5pt;color:blue">mailto:damien.atkinson-buck@ivanhoe.com.au</span></u></span><span style="color:#1F497D;text-decoration:none"><br>
</span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><u><span style="font-size:7.5pt;color:blue">http://myivanhoe.net</span></u><o:p></o:p></span></a></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none"> </span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none"> </span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US" style="font-size:10.0pt"><a href="http://myivanhoe.net/" target="_blank"><span style="color:windowtext;text-decoration:none">From:</span><span style="color:windowtext;font-weight:normal;text-decoration:none">
Travis Parker [mailto:<u><span style="color:blue">Travis.Parker@beaconhills.vic.edu.au</span></u>]
<br>
</span><span style="color:windowtext;text-decoration:none">Sent:</span><span style="color:windowtext;font-weight:normal;text-decoration:none"> Thursday, 12 May 2011 9:26 AM</span><span lang="EN-AU" style="font-size:12.0pt;color:windowtext;font-weight:normal;text-decoration:none"><o:p></o:p></span></a></span></b></p>
<div>
<p class="MsoNormal"><a href="http://myivanhoe.net/" target="_blank"><span style="color:windowtext;text-decoration:none"><br>
<b>To:</b> Year 12 Software Development Teachers' Mailing List<o:p></o:p></span></a></p>
</div>
<p class="MsoNormal"><b><a href="http://myivanhoe.net/" target="_blank"><span style="color:windowtext;text-decoration:none">Subject:</span><span style="color:windowtext;font-weight:normal;text-decoration:none"> Re: [Year 12 SofDev] Reading and Writing text
data files in VB2010<o:p></o:p></span></a></b></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="http://myivanhoe.net/" target="_blank"><span style="color:windowtext;text-decoration:none"> <o:p></o:p></span></a></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none">Thanks for that Mark. I have been using
something similar with my students, particularly as the SAC I have written includes reading from a text file (A prototype helpdesk, including type of job, computer, priority, etc) and creating a new text file with jobs for the techies in a prioritised order.</span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none"> </span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none">One thing I was wondering though, does
anyone have anything good on reading comma separated text files? All the programs I have gotten my students to create read them a line at a time, but I would ideally like to see something like this line -
</span><span style="font-size:12.0pt;color:windowtext;text-decoration:none">tim.cox, hardware, 12, ps40, 2
</span><span style="color:#1F497D;text-decoration:none">read into arrays. So I would have a “Name”, “Issue”, “Computer_Number”, “Room_Number”, “Priority” or something like that. I’m fine with the arrays, but how would I read it in word at a time (i.e. Between
commas” rather than line at a time?</span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none"> </span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none">With many thanks for a first year SD
newbie……</span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none"> </span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none">Trav</span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none"> </span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none"> </span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none"> </span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none"> </span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;color:#1F497D"><a href="http://myivanhoe.net/" target="_blank"><span style="color:#1F497D;text-decoration:none"> </span><span style="font-size:12.0pt;color:windowtext;text-decoration:none"><o:p></o:p></span></a></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US" style="font-size:10.0pt"><a href="http://myivanhoe.net/" target="_blank"><span style="color:windowtext;text-decoration:none">From:</span><span style="color:windowtext;font-weight:normal;text-decoration:none">
<u><span style="color:blue">sofdev-bounces@edulists.com.au</span></u> [mailto:<u><span style="color:blue">sofdev-bounces@edulists.com.au</span></u>]
</span><span style="color:windowtext;text-decoration:none">On Behalf Of </span><span style="color:windowtext;font-weight:normal;text-decoration:none">Mark KELLY<br>
</span><span style="color:windowtext;text-decoration:none">Sent:</span><span style="color:windowtext;font-weight:normal;text-decoration:none"> Wednesday, 11 May 2011 12:45 PM<br>
</span><span style="color:windowtext;text-decoration:none">To:</span><span style="color:windowtext;font-weight:normal;text-decoration:none"> Year 12 Software Development Teachers' Mailing List<br>
</span><span style="color:windowtext;text-decoration:none">Subject:</span><span style="color:windowtext;font-weight:normal;text-decoration:none"> [Year 12 SofDev] Reading and Writing text data files in VB2010</span><span lang="EN-AU" style="font-size:12.0pt;color:windowtext;font-weight:normal;text-decoration:none"><o:p></o:p></span></a></span></b></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="http://myivanhoe.net/" target="_blank"><span style="color:windowtext;text-decoration:none"> <o:p></o:p></span></a></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a href="http://myivanhoe.net/" target="_blank"><span style="color:windowtext;text-decoration:none">Hi, you paragons of pedagogy. I've been putting off teaching my kids how to
read and write text data files in VB but having investigated today, it's not really more difficult than the days of VB6 with OPEN "file" FOR INPUT AS 1 ... INPUT #1, data.<br>
<br>
I've attached an adapted tutorial on reading and writing text files with a task involving reading and writing a preferences file (with solution).<br>
<br>
Once your kids can do data files, it greatly opens the scope for populating and playing with really large arrays and makes loops meaningful.
<br>
<br>
I remember how excited I was when I first discovered text files decades ago - it was like finding mum's car keys. My programming world blossomed from that point.<br clear="all">
<br>
-- <br>
Mark Kelly<br>
Manager of ICT, Reporting, IT Learning Area<br>
McKinnon Secondary College<br>
McKinnon Rd McKinnon 3204, Victoria, Australia<br>
Direct line / Voicemail: +613 8520 9085, Fax +613 9578 9253<br>
<u><span style="color:blue">kel@mckinnonsc.vic.edu.au</span></u><br>
VCE IT Lecture Notes: <u><span style="color:blue">http://vceit.com</span></u><br>
Moderator: IT Applications Edulist<br>
<br>
Want a good time? Call 0112358. Ask for Mr Fibonacci.<o:p></o:p></span></a></p>
</div>
</div>
</div>
<p class="MsoNormal"><a href="http://myivanhoe.net/" target="_blank"><span style="color:windowtext;text-decoration:none"><br>
<br>
<br>
<br>
Privacy, Virus and Copyright Warning<br>
<br>
The information contained in this electronic message (e-mail), and any files transmitted with it:<br>
<br>
* is intended for the named recipients only. If you have received this in error, please advise the sender and delete it and any copies immediately;<br>
* Any personal information in this email must be used in accordance with the Privacy Act 1988 and this always applies even if it has been sent to you in error.<br>
* represents the views of the sender and does not necessarily represent the views or formal advice of Ivanhoe Grammar School;<br>
* may be subject to Copyright, so no further use should be made of it without the author's permission.<br>
<br>
The School does not represent or warrant that the email or any files attached do not contain errors or are free from computer viruses or other defects nor does it accept responsibility for any loss or damage resulting directly or indirectly from the use of
the email or any attached files. <o:p></o:p></span></a></p>
</div>
<p class="MsoNormal"><a href="http://myivanhoe.net/" target="_blank"><span style="color:windowtext;text-decoration:none"><br>
_______________________________________________<br>
<u><span style="color:blue">http://www.edulists.com.au</span></u> - FAQ, Subscribe, Unsubscribe<br>
IT Software Development Mailing List kindly supported by<br>
<u><span style="color:blue">http://www.vcaa.vic.edu.au</span></u> - Victorian Curriculum and Assessment Authority and<br>
<u><span style="color:blue">http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html</span></u><br>
<u><span style="color:blue">http://www.vitta.org.au</span></u> - VITTA Victorian Information Technology Teachers Association Inc<o:p></o:p></span></a></p>
</div>
<p class="MsoNormal"><a href="http://myivanhoe.net/" target="_blank"><span style="color:windowtext;text-decoration:none"><br>
<br clear="all">
<br>
-- <br>
Mark Kelly<br>
Manager of ICT, Reporting, IT Learning Area<br>
McKinnon Secondary College<br>
McKinnon Rd McKinnon 3204, Victoria, Australia<br>
Direct line / Voicemail: +613 8520 9085, Fax +613 9578 9253<br>
<u><span style="color:blue">kel@mckinnonsc.vic.edu.au</span></u><br>
VCE IT Lecture Notes: <u><span style="color:blue">http://vceit.com</span></u><br>
Moderator: IT Applications Edulist<br>
<br>
Want a good time? Call 0112358. Ask for Mr Fibonacci.<o:p></o:p></span></a></p>
</div>
<br>
<br>
<br>
<br>
Privacy, Virus and Copyright Warning<br>
<br>
The information contained in this electronic message (e-mail), and any files transmitted with it:<br>
<br>
* is intended for the named recipients only. If you have received this in error, please advise the sender and delete it and any copies immediately;<br>
* Any personal information in this email must be used in accordance with the Privacy Act 1988 and this always applies even if it has been sent to you in error.<br>
* represents the views of the sender and does not necessarily represent the views or formal advice of Ivanhoe Grammar School;<br>
* may be subject to Copyright, so no further use should be made of it without the author's permission.<br>
<br>
The School does not represent or warrant that the email or any files attached do not contain errors or are free from computer viruses or other defects nor does it accept responsibility for any loss or damage resulting directly or indirectly from the use of
the email or any attached files.
</body>
</html>