[Year 12 SofDev] Records and Arrays

John Schwartz jschwartz at parade.vic.edu.au
Fri Aug 20 10:36:16 EST 2010


Nope! Real men use COBAL via punched 80 column cards and rarely actually see the computer.
John

John Schwartz
Parade College
1436 Plenty Road
Bundoora, Victoria, 3083
Phone: 03 9468 3300
Fax: 03 9467 3937
e-mail: jschwartz at parade.vic.edu.au
web: www.parade.vic.edu.au

This e-mail and any attachments may be confidential. You must not disclose or use the information in this e-mail if you are not the intended recipient. If you have received this e-mail in error, please notify Parade College on (03) 9468 3300 immediately and delete the e-mail and all copies. Parade College does not guarantee that this e-mail is virus or error free. The attached files are provided and may only be used on the basis that the user assumes all responsibility for any loss, damage or consequence resulting directly or indirectly from the use of the attached files, whether caused by the negligence of the sender or not. Any views expressed in this e-mail are the views of the individual sending the message, and do not necessarily reflect the views held by Parade College.
-----Original Message-----
From: Laurie Savage [mailto:savage.john.l at edumail.vic.gov.au] 
Sent: Friday, 20 August 2010 10:23 AM
To: 'Year 12 Software Development Teachers' Mailing List'
Subject: Re: [Year 12 SofDev] Records and Arrays

Rubbish, real men use COBOL! On green screens running on a daisy chain
network with the CTOS/Unisys OS. 

Reminds me of a lovely Dilbert cartoon of two old geezers reminiscing about
the days when all you needed to program was ones and zeroes.
 
Laurie

Written from brown paper bag in t'swamp using a Remington typewriter.

-----Original Message-----
From: sofdev-bounces at edulists.com.au [mailto:sofdev-bounces at edulists.com.au]
On Behalf Of Don Morelli (Optus)
Sent: Friday, 20 August 2010 9:52 AM
To: 'Year 12 Software Development Teachers' Mailing List'
Subject: Re: [Year 12 SofDev] Records and Arrays

I am sure that I used Knuth when I did Information Science in 1972 (could be
wrong as I couldn't actually find the book) and I don't know why you guys
use these new fandangled programming languages the blur old well understood
distinctions, as the catch cry in the 70's and mid 80's and should still be,
"Real men use Fortran"
Cheers Don :)

-----Original Message-----
From: sofdev-bounces at edulists.com.au [mailto:sofdev-bounces at edulists.com.au]
On Behalf Of Kevork Krozian
Sent: Thursday, 19 August 2010 11:13 PM
To: 'Year 12 Software Development Teachers' Mailing List'
Subject: Re: [Year 12 SofDev] Records and Arrays

Hi Guy,

 Wow this is really getting interesting !!!  No, I mean it .... :))

I wouldn't dare argue with Knuth especially since he was the author of my
Computer Science 101 text at Monash Uni in 1981 .. but

Check out 
http://en.wikipedia.org/wiki/Enumerated_type 

specifically look for the line:
 
Pascal style languages also allow for enumeration to be used as array index
type
    cardsuit = (clubs, diamonds, hearts, spades);
var
    suitcount: array [cardsuit] of integer;

I used this enumerated type as the index for many arrays in my early years
using Pascal such as 

type
    month = (jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec);
var
    rainfall: array [month] of real;
Also, quoting further from the Wikipedia source above,
"
The order in which the enumeration values are given matters. An enumerated
type is an ordinal type, and the pred and succ functions will give the prior
or next value of the enumeration, and ord can convert enumeration values to
their integer representation. Standard Pascal does not offer a conversion
from arithmetic types to enumerations, however. Extended Pascal offers this
functionality via an extended succ function. Some other Pascal dialects
allow it via type-casts. Some modern descendants of Pascal, such as
Modula-3, provide a special conversion syntax using a method called VAL;
Modula-3 also treats BOOLEAN and CHAR as special pre-defined enumerated
types and uses ORD and VAL for standard ASCII decoding and encoding."

Admittedly I have neither tried or investigated this implementation with
other languages but Delphi users out there can perhaps tell us if it is also
found in that implementation since the VCAA advice refers to Pascal and
similar languages such as Delphi.


Kind Regards

Kevork Krozian
Edulists Creator Administrator
www.edulists.com.au
tel: 0419 356 034


-----Original Message-----
From: sofdev-bounces at edulists.com.au [mailto:sofdev-bounces at edulists.com.au]
On Behalf Of Guy Flaherty
Sent: Thursday, 19 August 2010 11:01 PM
To: sofdev at edulists.com.au
Subject: Re: [Year 12 SofDev] Records and Arrays

Kevork,

Wikipedia states that the index for an array is an integer based one and
provides references from Donald Knuth and Paul E. Black to support this.
It states that this index is required to be used when calculating the
address of the memory location for each item in the array. This actually
is explained to be one of the general differentiators between an array
and a record, in that an array's memory addresses can be computed at
run-time using the integer index and a record's cannot be easily
computed at run-time.

I think it would be a brave list to argue against Knuth ;) I am not sure
if I am helping anyone here :D

Guy Flaherty

>>> "Kevork Krozian"  19/08/10 10:05 PM >>>
Hi Folks,

 

 Just watching from the sidelines at present and having a feeling of déjà
vu. There are quite a few examples of definitions that have
disadvantaged my
students in the past not least in the role and functions of  networking
components (hubs vs switches, modems and routers and firewalls and virus
protection etc )  as well as data types in programming definitions. 

The last time I used Pascal was around 1995 or so at least in so far as
programming at Year 12.

Sure I used records of files but more commonly found records as a single
line in a database which we are not allowed to use in our programming. I
haven't heard of a file of records for many years - only a database of
records. Perhaps, I will leave that discussion for another time.

 

More generally and this is related to the definition used by Adrian here
,
the index for an array does not have to be an integer. It can be any
enumerated type eg. Inbuilt ones such as characters defined by say the
ASCII
sequence, meaning 'a' , 'b' , 'c' ,'d' etc can be used to index an array
or
a user defined enumerated range eg. 'Jan', 'Feb' , 'Mar', 'Apr' etc can
also
be used to index an array.

 

I also come from the Fortran, Pascal, Cobol, C, Prolog, Java, PHP,
Python,
Visual C# pathway in my programming development and have had to make the
transition into new areas of programming where the older definitions are
no
longer uniformly found in all languages. That would be the evolution of
programming and the blurring of the definitions of data types akin to
the
analogy of applications that blur the lines that used to separate them (
think Word Processors, spreadsheets and databases).

 

Take Care

 

Kevork Krozian

Edulists Creator Administrator

www.edulists.com.au

tel: 0419 356 034

 

From: sofdev-bounces at edulists.com.au
[mailto:sofdev-bounces at edulists.com.au]
On Behalf Of Janson, Adrian A
Sent: Thursday, 19 August 2010 8:54 PM
To: Year 12 Software Development Teachers' Mailing List
Subject: Re: [Year 12 SofDev] Records and Arrays

 

Hi everyone,

 

I know that some of you were happy with the definitions I posted before,
and
I do want to keep them simple - but, how about this:

 

 

One-Dimensional Arrays

 

A one dimensional (or 1D) array is a data structure in which variables
are
grouped together under the same name and accessed via a number known as
the
'index'.  Although an array typically contains only one data type, it
can
consist of multiple data types (as is possible in some languages such as
PHP
and Python).

 

....

 

Records

 

A record is a structure that can be used to group together variables for
a
particular purpose.  Records are similar to arrays but whereas an array
usually contains elements all of the same type, the variables within a
record are usually of different types and sizes.  Indexing the elements
of a
record is often done via an identifier which is declared at the same
time as
the record.

 

 

The important thing - as some have stated already, is for us to be able
to
tell students: 'this is the standard definition of an array and a
record'.
So if a student were asked on the exam 'what is an array', they could
answer
'an array is a data structure in
which variables are grouped together
under
the same name and accessing using an index number'. - and get full
marks.

 

Adrian

 

Adrian Janson B.Sc, Dip.Ed, M.Ed
Director of ICT
Melbourne High School, Forrest Hill, South Yarra, Victoria 3141
Australia.
Phone: 03 9826 0711 International: +61 3 9826 0711
Fax: 03 9826 8767 International: +61 3 9826 8767
E-mail: janson.adrian.a at edumail.vic.gov.au
 

Website: http://www.mhs.vic.edu.au  

Blog: http://jansona.edublogs.org  

 

  _____  

From: sofdev-bounces at edulists.com.au on behalf of David Dawson
Sent: Thu 19/08/2010 8:46 PM
To: sofdev at edulists.com.au
Subject: Re: [Year 12 SofDev] Records and Arrays

What a fascinating discussion this is! (No I mean it!)
When I started teaching Pascal in 1998 - I was so confused by "records"
- and came to see them as "customised data types" and - having just
learnt some Java and C++ - I figured they were really like Classes - or
even objects.
In any case I have not come up against this mysterious "data structure"
in the other languages I have explored - in C they are constructed and
can be called anything - and I bet that the library file could be
renamed ""list_o_stuff" - even in Pascal.
I prefer PHP at present and in PHP - like so many languages - the thing
people seem to miss is that in "weakly typed languages" everything just
starts as a String and is dealt with "contextually" as someone cleverly
pointed out earlier. If there are numbers we wish to multiply the
language figures this out by our operations - very smooth!
An array is a list defined by a computer language to store temporary
Strings! Some languages limit these - if they insist on strong variable
typing.
I really hope records are just amended out of any reference in the study
design.
IMHO they died 10 years ago!

David Dawson
Head of Information Technology Learning Area
Head of Learning Technologies
St Kilda Rd Campus
Wesley College
577 St Kilda Rd
Melbourne 3004
Ph 8102 6340
Mob 0425 718147

____________________________________________________________________________

Sapere Aude - Dare To Be Wise

Wesley College Melbourne is a world class coeducational independent
school
developing the whole person through timeless principles of learning:
- to know
- to do
- to live with
- to be
with innovation and wisdom

ABN 38 994 068 473  CRICOS 00354G
____________________________________________________________________________

This email is intended only for the use of the individual or entity
named
above and may contain information that is confidential and privileged.
If
you are not the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this email is strictly
prohibited.
If you have received this email in error, please email a reply to Wesley
College and destroy the original message.

_______________________________________________
http://www.edulists.com.au   - FAQ, Subscribe,
Unsubscribe
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au   - Victorian
Curriculum and Assessment Authority and
http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html
http://www.vitta.org.au    - VITTA Victorian
Information Technology Teachers Association Inc

Important - This email and any attachments may be confidential. If
received
in error, please contact us and delete all copies. Before opening or
using
attachments check them for viruses and defects. Regardless of any loss,
damage or consequence, whether caused by the negligence of the sender or
not, resulting directly or indirectly from the use of any attached files
our
liability is limited to resupplying any affected attachments. Any
representations or opinions expressed are those of the individual
sender,
and not necessarily those of the Department of Education and Early
Childhood
Development.



Scanned by Sonar. 
Date: 2010-08-19 22:03:35.610
From: sofdev-bounces at edulists.com.au
To: g.flaherty at xavier.vic.edu.au
Profile: Default_In
Mail id: challenge-2219363507xur-0



"This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the Network Manager
at Xavier College. Please note that any views or opinions presented in this
email are solely those of the author and do not necessarily represent those
of Xavier College. Whilst every attempt has been made to ensure material in
this email message is free from computer viruses or other defects, the
attached files are provided, and may only be used, on the basis that the
user assumes all responsibility for the use of the material transmitted."


_______________________________________________
http://www.edulists.com.au - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment Authority
and
http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html 
http://www.vitta.org.au  - VITTA Victorian Information Technology Teachers
Association Inc



_______________________________________________
http://www.edulists.com.au - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment Authority
and
http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html 
http://www.vitta.org.au  - VITTA Victorian Information Technology Teachers
Association Inc


_______________________________________________
http://www.edulists.com.au - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment Authority
and
http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html 
http://www.vitta.org.au  - VITTA Victorian Information Technology Teachers
Association Inc


Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.

_______________________________________________
http://www.edulists.com.au - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment Authority and
http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html 
http://www.vitta.org.au  - VITTA Victorian Information Technology Teachers Association Inc





More information about the sofdev mailing list