<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16421">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Please no PSV :-)</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>CSV is supposed to be a "standard" - and MS Excel
produces very nice CSV files using the double quotes and allows commas within
the quotes. </FONT><FONT size=2 face=Arial>Eg</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>"Fred, Blogs","24 Overshot Lane, Overthetop, Vic,
3000"</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>So if MS Excel can produce these files, why on
earth can MS VBNET not accommodate them?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Of course, following the ItApps discussion on
normalisation, I would prefer to separate the individual parts of names and
addresses to give us</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>"Fred","Blogs","24 Overshot
Lane","Overthetop","Vic","3000"</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Robert Hind (Semi-retired) OOF, GOM<BR>Ashwood and
Traralgon<BR><A
href="mailto:robert@yinnar.com">robert@yinnar.com</A></FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=kel@mckinnonsc.vic.edu.au
href="mailto:kel@mckinnonsc.vic.edu.au">Mark KELLY</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=sofdev@edulists.com.au
href="mailto:sofdev@edulists.com.au">Year 12 Software Development Teachers'
Mailing List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, May 12, 2011 3:49
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Year 12 SofDev] Reading and
Writing text data files in VB2010</DIV>
<DIV><BR></DIV>Well, you <I>could</I> but you'd have PSV (pipe separated
values) instead of CSV :-)<BR><BR>Most generic textual data is CSV (with
double quotes)... I don't know why VB can't accommodate them, even as an
option.<BR><BR>
<DIV class=gmail_quote>On 12 May 2011 15:31, Margaret King Iaquinto <SPAN
dir=ltr><<A
href="mailto:iaquinto@ozemail.com.au">iaquinto@ozemail.com.au</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>Can you use the pipe symbol (|) as a delimiter in VBNEB?
In PHP that works. Then the other commas don't get in the way.<BR><BR>VK3CFI
<BR><BR><SPAN style="FONT-WEIGHT: bold">On Thu May 12 12:32 ,
'ATKINSON-BUCK, Damien' sent:<BR><BR></SPAN>
<BLOCKQUOTE
style="BORDER-LEFT: #f5f5f5 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV lang=EN-AU vlink="purple" link="blue">
<DIV>
<P class=MsoNormal><A name=12fe2b6e84773b57__MailEndCompose><SPAN
style="FONT-FAMILY: ; FONT-SIZE: 11pt">No, I can’t seem to find a way to
do that, but as a <SPAN style="TEXT-DECORATION: underline">very
dodgy</SPAN> 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</SPAN></A></P>
<DIV class=im>
<P class=MsoNormal><SPAN style="FONT-FAMILY: ; FONT-SIZE: 11pt">Eg
</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt">1,,WE RUN THE NIGHT,,DJ
Havana, Brown,,ISL/UMA</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">Dim</SPAN><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"> Values() <SPAN
style="COLOR: blue">As</SPAN> <SPAN style="COLOR: blue">String</SPAN> =
Split(strAlbumName, <SPAN style="COLOR: #a31515">","</SPAN>)</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: ; FONT-SIZE: 11pt">Would
split everything normally and allow a comma between Havana and Brown.
</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: ; FONT-SIZE: 11pt"></SPAN> </P></DIV>
<TABLE style="WIDTH: 522pt" border=0 cellSpacing=0 cellPadding=0
width=696>
<TBODY>
<TR>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; PADDING-TOP: 0cm">
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-WEIGHT: bold">Damien
Atkinson-Buck</SPAN><SPAN
style="FONT-FAMILY: ; FONT-SIZE: 10pt"><BR>Member of Academic Staff
(Secondary)</SPAN><SPAN
style="FONT-FAMILY: ; FONT-SIZE: 11pt"></SPAN></P>
<DIV>
<DIV class=MsoNormal><SPAN style="FONT-FAMILY: ; FONT-SIZE: 10pt">
<HR style="WIDTH: 375pt" align=left SIZE=2 width=500>
</SPAN></DIV></DIV></TD></TR>
<TR>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; PADDING-TOP: 0cm">
<TABLE style="WIDTH: 522pt" border=0 cellSpacing=0 cellPadding=0
width=696>
<TBODY>
<TR>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 123pt; PADDING-RIGHT: 0cm; PADDING-TOP: 0cm"
width=164>
<P class=MsoNormal><A href="http://myivanhoe.net/"
target=_blank><SPAN
style="FONT-FAMILY: ; FONT-SIZE: 11pt"><IMG
alt="Blocked image" src=""></SPAN></A><SPAN
style="FONT-FAMILY: "></SPAN></P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 3.75pt; PADDING-RIGHT: 0cm; PADDING-TOP: 0cm"
width=5>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: ; FONT-SIZE: 11pt"></SPAN><SPAN
style="FONT-FAMILY: "></SPAN> </P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; PADDING-TOP: 0cm">
<P class=MsoNormal><SPAN
style="FONT-FAMILY: ; FONT-SIZE: 7.5pt">PO BOX 91
The Ridgeway, Ivanhoe, Victoria 3079 Australia<BR>Telephone
+61 3 9490 3848 Facsimile +61 3 9490 3490<BR></SPAN><A><SPAN
style="FONT-FAMILY: ; FONT-SIZE: 7.5pt">mailto:damien.atkinson-buck@ivanhoe.com.au</SPAN></A><SPAN
style="FONT-FAMILY: ; FONT-SIZE: 7.5pt"><BR></SPAN><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="FONT-FAMILY: ; FONT-SIZE: 7.5pt">http://myivanhoe.net</SPAN></A><SPAN
style="FONT-FAMILY: "></SPAN></P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<DIV class=im>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: ; FONT-SIZE: 11pt"></SPAN> </P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: ; FONT-SIZE: 11pt"></SPAN> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-WEIGHT: bold"
lang=EN-US>From:</SPAN><SPAN style="FONT-FAMILY: ; FONT-SIZE: 10pt"
lang=EN-US> Mark KELLY [mailto:<A href="mailto:kel@mckinnonsc.vic.edu.au"
target=_blank>kel@mckinnonsc.vic.edu.au</A>] <BR><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN> Thursday, 12 May 2011 11:19
AM<BR><SPAN style="FONT-WEIGHT: bold">To:</SPAN> Year 12 Software
Development Teachers' Mailing List<BR><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN> Re: [Year 12 SofDev] Reading and
Writing text data files in VB2010</SPAN></P>
<P class=MsoNormal> </P>
<P style="MARGIN-BOTTOM: 12pt" class=MsoNormal>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 :-(</P></DIV>
<DIV>
<DIV class=im>
<P class=MsoNormal>On 12 May 2011 09:37, ATKINSON-BUCK, Damien
<<A>Damien.ATKINSON-BUCK@ivanhoe.com.au</A>> wrote:</P></DIV>
<DIV>
<DIV>
<DIV class=im>
<P class=MsoNormal><A
name=12fe2b6e84773b57_12fe171392d168f9__MailEndCompose><SPAN
style="COLOR: #1f497d; FONT-SIZE: 11pt">Mark, thanks for another great
tutorial. Building on Marks work might be what you need
Trav</SPAN></A></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d; FONT-SIZE: 11pt"></SPAN> </P></DIV>
<DIV
style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 1pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0cm">
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt">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></P>
<DIV>
<DIV></DIV>
<DIV class=h5>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt"></SPAN> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt">1,WE RUN THE NIGHT,DJ
Havana Brown,ISL/UMA</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt">2,FROM THE MUSIC,The
Potbelleez,VIC/UMA</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt">3,WHAT HAPPENED TO
USJessica Mauboy Feat. Jay Sean,SME</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt">4,DANCE WITH ME,Justice
Crew Feat. Flo Rida,SME</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt">5,FRIDAY TO
SUNDAY,Justice Crew,SME</SPAN></P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt">6,MAYBE,Sick
Puppies,VIR/EMI</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt"></SPAN> </P></DIV></DIV></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>
<P style="TEXT-AUTOSPACE: " class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">
<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-FAMILY: ; FONT-SIZE: 10pt">u:\albums.txt</SPAN><SPAN
style="FONT-FAMILY: Consolas; COLOR: #a31515; FONT-SIZE: 9.5pt">
"</SPAN><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">)</SPAN></P>
<P style="TEXT-AUTOSPACE: " class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">
<SPAN style="COLOR: blue">Dim</SPAN> strAlbumName <SPAN
style="COLOR: blue">As</SPAN> <SPAN
style="COLOR: blue">String</SPAN></SPAN></P>
<P style="TEXT-AUTOSPACE: " class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">
strAlbumName = TextFile.ReadLine()</SPAN></P>
<P style="TEXT-AUTOSPACE: " class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">
<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></P>
<P style="TEXT-AUTOSPACE: " class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">
<SPAN
style="COLOR: green">'lstAlbums.Items.Add(strAlbumName)</SPAN></SPAN></P>
<P style="TEXT-AUTOSPACE: " class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">
<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></P>
<P style="TEXT-AUTOSPACE: " class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">
strAlbumName = TextFile.ReadLine()</SPAN></P>
<P style="TEXT-AUTOSPACE: " class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">
<SPAN style="COLOR: green">' Values(0) now contains first column
value,</SPAN></SPAN></P>
<P style="TEXT-AUTOSPACE: " class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">
<SPAN style="COLOR: green">' Values(1) contains second column,
etc.</SPAN></SPAN></P>
<P style="TEXT-AUTOSPACE: " class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">
<SPAN style="COLOR: blue">Loop</SPAN></SPAN></P>
<P style="TEXT-AUTOSPACE: " class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">
TextFile.Close()</SPAN></P>
<P style="TEXT-AUTOSPACE: " class=MsoNormal><SPAN
style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">
TextFile.Dispose()</SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d; FONT-SIZE: 11pt"></SPAN> </P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d; FONT-SIZE: 11pt">Cheers</SPAN></P>
<DIV>
<TABLE style="WIDTH: 522pt" border=0 cellSpacing=0 cellPadding=0
width=696>
<TBODY>
<TR>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; PADDING-TOP: 0cm">
<P class=MsoNormal><SPAN
style="COLOR: rgb(31,73,125); FONT-SIZE: 10pt; FONT-WEIGHT: bold">Damien
Atkinson-Buck</SPAN><SPAN
style="COLOR: #1f497d; FONT-SIZE: 10pt"><BR>Member of Academic Staff
(Secondary)</SPAN></P>
<DIV>
<DIV>
<DIV class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 10pt">
<HR style="WIDTH: 375pt" align=left SIZE=2 width=500>
</SPAN></DIV></DIV></DIV></TD></TR>
<TR>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; PADDING-TOP: 0cm">
<TABLE style="WIDTH: 522pt" border=0 cellSpacing=0 cellPadding=0
width=696>
<TBODY>
<TR>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 123pt; PADDING-RIGHT: 0cm; PADDING-TOP: 0cm"
width=164>
<P class=MsoNormal><A href="http://myivanhoe.net/"
target=_blank><SPAN
style="COLOR: windowtext; TEXT-DECORATION: none"></SPAN></A></P><BR></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; WIDTH: 3.75pt; PADDING-RIGHT: 0cm; PADDING-TOP: 0cm"
width=5>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d; FONT-SIZE: 11pt"><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none"></SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN> </P></TD>
<TD
style="PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; PADDING-TOP: 0cm">
<P class=MsoNormal><SPAN
style="COLOR: #1f497d; FONT-SIZE: 7.5pt"><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="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"><SPAN
style="COLOR: blue; FONT-SIZE: 7.5pt; TEXT-DECORATION: underline">mailto:damien.atkinson-buck@ivanhoe.com.au</SPAN></SPAN><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none"><BR></SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"><SPAN
style="COLOR: blue; FONT-SIZE: 7.5pt; TEXT-DECORATION: underline">http://myivanhoe.net</SPAN></SPAN></A></SPAN></P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none"></SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN> </P></DIV>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none"></SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN> </P>
<DIV>
<DIV
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-WEIGHT: bold"
lang=EN-US><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:<SPAN
style="COLOR: blue; TEXT-DECORATION: underline">Travis.Parker@beaconhills.vic.edu.au</SPAN>]
<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
style="COLOR: windowtext; FONT-SIZE: 12pt; FONT-WEIGHT: normal; TEXT-DECORATION: none"
lang=EN-AU></SPAN></A></SPAN></P>
<DIV>
<P class=MsoNormal><A href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: windowtext; TEXT-DECORATION: none"><BR><SPAN
style="FONT-WEIGHT: bold">To:</SPAN> Year 12 Software Development
Teachers' Mailing List</SPAN></A></P></DIV>
<P class=MsoNormal><SPAN style="FONT-WEIGHT: bold"><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</SPAN></A></SPAN></P></DIV></DIV></DIV></DIV>
<DIV>
<DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>
<P class=MsoNormal><A href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: windowtext; TEXT-DECORATION: none"></SPAN></A> </P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><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="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none"></SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN> </P></DIV></DIV>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><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="COLOR: windowtext; FONT-SIZE: 12pt; 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="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none"></SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><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="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN></P>
<DIV>
<DIV></DIV>
<DIV class=h5>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none"></SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none">Trav</SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none"></SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none"></SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none"></SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none"></SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d; FONT-SIZE: 11pt"><A
href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: #1f497d; TEXT-DECORATION: none"></SPAN><SPAN
style="COLOR: windowtext; FONT-SIZE: 12pt; TEXT-DECORATION: none"></SPAN></A></SPAN> </P>
<P class=MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-WEIGHT: bold"
lang=EN-US><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">
<SPAN
style="COLOR: blue; TEXT-DECORATION: underline">sofdev-bounces@edulists.com.au</SPAN>
[mailto:<SPAN
style="COLOR: blue; TEXT-DECORATION: underline">sofdev-bounces@edulists.com.au</SPAN>]
</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
style="COLOR: windowtext; FONT-SIZE: 12pt; FONT-WEIGHT: normal; TEXT-DECORATION: none"
lang=EN-AU></SPAN></A></SPAN></P>
<P class=MsoNormal><A href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: windowtext; TEXT-DECORATION: none"></SPAN></A> </P>
<P class=MsoNormal><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><SPAN
style="COLOR: blue; TEXT-DECORATION: underline">kel@mckinnonsc.vic.edu.au</SPAN><BR>VCE
IT Lecture Notes: <SPAN
style="COLOR: blue; TEXT-DECORATION: underline">http://vceit.com</SPAN><BR>Moderator:
IT Applications Edulist<BR><BR>Want a good time? Call 0112358. Ask for Mr
Fibonacci.</SPAN></A></P></DIV></DIV></DIV></DIV></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>
<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.
</SPAN></A></P></DIV></DIV></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>
<P class=MsoNormal><A href="http://myivanhoe.net/" target=_blank><SPAN
style="COLOR: windowtext; TEXT-DECORATION: none"><BR>_______________________________________________<BR><SPAN
style="COLOR: blue; TEXT-DECORATION: underline">http://www.edulists.com.au</SPAN>
- FAQ, Subscribe, Unsubscribe<BR>IT Software Development Mailing List
kindly supported by<BR><SPAN
style="COLOR: blue; TEXT-DECORATION: underline">http://www.vcaa.vic.edu.au</SPAN>
- Victorian Curriculum and Assessment Authority and<BR><SPAN
style="COLOR: blue; TEXT-DECORATION: underline">http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html</SPAN><BR><SPAN
style="COLOR: blue; TEXT-DECORATION: underline">http://www.vitta.org.au</SPAN>
- VITTA Victorian Information Technology Teachers Association
Inc</SPAN></A></P></DIV></DIV></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>
<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><SPAN
style="COLOR: blue; TEXT-DECORATION: underline">kel@mckinnonsc.vic.edu.au</SPAN><BR>VCE
IT Lecture Notes: <SPAN
style="COLOR: blue; TEXT-DECORATION: underline">http://vceit.com</SPAN><BR>Moderator:
IT Applications Edulist<BR><BR>Want a good time? Call 0112358. Ask for Mr
Fibonacci.</SPAN></A></P></DIV></DIV></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5><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.
</DIV></DIV></DIV></BLOCKQUOTE><BR><BR>_______________________________________________<BR><A
href="http://www.edulists.com.au"
target=_blank>http://www.edulists.com.au</A> - FAQ, Subscribe,
Unsubscribe<BR>IT Software Development Mailing List kindly supported
by<BR><A href="http://www.vcaa.vic.edu.au"
target=_blank>http://www.vcaa.vic.edu.au</A> - Victorian Curriculum and
Assessment Authority and<BR><A
href="http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html"
target=_blank>http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html</A><BR><A
href="http://www.vitta.org.au" target=_blank>http://www.vitta.org.au</A>
- VITTA Victorian Information Technology Teachers Association
Inc<BR></BLOCKQUOTE></DIV><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><A href="mailto:kel@mckinnonsc.vic.edu.au"
target=_blank>kel@mckinnonsc.vic.edu.au</A><BR>VCE IT Lecture Notes: <A
href="http://vceit.com" target=_blank>http://vceit.com</A><BR>Moderator: IT
Applications Edulist<BR><BR><FONT size=+0>Want a good time? Call 0112358. Ask
for Mr </FONT>Fibonacci.<BR>
<P>
<HR>
<P></P>_______________________________________________<BR>http://www.edulists.com.au
- FAQ, Subscribe, Unsubscribe<BR>IT Software Development Mailing List kindly
supported by<BR>http://www.vcaa.vic.edu.au - Victorian Curriculum and
Assessment Authority
and<BR>http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html
<BR>http://www.vitta.org.au - VITTA Victorian Information Technology
Teachers Association Inc</BLOCKQUOTE></BODY></HTML>