[Year 12 SofDev] Arrays with mixed data types

Howard, David dhoward at stmichaels.vic.edu.au
Fri Jun 12 14:41:04 AEST 2015


They are most like a Hash in Ruby, or an assoc array. They can have multiple data types in them. It's one of the many reasons why it is known as a loosely typed language.

David Howard
Head of Learning Systems        [https://services.stmichaels.vic.edu.au/community/icons/Icon_Twitter.png] <http://twitter.com/StMichaelsGS>   [https://services.stmichaels.vic.edu.au/community/icons/Icon_FB.png] <https://services.stmichaels.vic.edu.au/fb.cfm>   [https://services.stmichaels.vic.edu.au/community/icons/Icon_LinkedIn.png] <https://www.linkedin.com/company/st-michael%27s-grammar-school>
25 Chapel Street, St Kilda VIC 3182 Australia   [https://services.stmichaels.vic.edu.au/community/logo/SMGS_Logo_tall_100_2013_96d.png] <https://www.stmichaels.vic.edu.au/>
t       +61 3 8530 3272                         e       dhoward at stmichaels.vic.edu.au<mailto:dhoward at stmichaels.vic.edu.au>
f       +61 3 9510 3161 w       stmichaels.vic.edu.au<https://www.stmichaels.vic.edu.au/>

CRICOS Provider 00345G
Please consider the environment before printing this email

From: Mark <mark at vceit.com<mailto:mark at vceit.com>>
Reply-To: Year List <sofdev at edulists.com.au<mailto:sofdev at edulists.com.au>>
Date: Friday, 12 June 2015 2:25 pm
To: Year List <sofdev at edulists.com.au<mailto:sofdev at edulists.com.au>>
Subject: Re: [Year 12 SofDev] Arrays with mixed data types

I'm not familiar with the inner workings of PHP, but my research suggests their 'arrays' are not exactly the same nature as most other languages.

It's sort of like when TV guides categorise 'Big Brother' as 'entertainment' ... a non-classical use of the term.

I ask because I'm writing an exam with a question about whether a 2D array with mixed data types is possible (or wise).

Cheers
Mark


On 12 June 2015 at 14:09, Laurie Savage <08327998 at pvgc.vic.edu.au<mailto:08327998 at pvgc.vic.edu.au>> wrote:
If it quacks like an array ...? Could you elaborate on why Python lists ain't arrayz?

Laurie

Laurie Savage
https://sites.google.com/a/pvgc.vic.edu.au/mr-savage/home

On 12 June 2015 at 13:27, Mark <mark at vceit.com<mailto:mark at vceit.com>> wrote:
Hi, codemakers.

Most languages require all elements of an array to have a single data type, but I have a nagging suspicion that there is an exception or two.

e.g. Apparently PHP allows mixed data types in its 'arrays' but I believe PHP 'arrays' are actually more like the lists found in Perl or Python and so are not classical arrays.

Is there a language that allows true arrays with mixed data types?

Cheers
Mark

--

Before Facebook, how many people would take a picture of their dinner on a disposable camera, get the photos developed, then go round to your friends' houses and show them all the photo?

--

Mark Kelly
[https://docs.google.com/uc?export=download&id=0B4DRNqu3Y8sZMzZhNVhJS3NEXzQ&revid=0B4DRNqu3Y8sZaGY5bUlSU2ZmUlhVYTdLKzBCMGtXdkZhaTBVPQ]
http://vceit.com

_______________________________________________
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.swinburne.edu.au/ict/schools - Swinburne University


_______________________________________________
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.swinburne.edu.au/ict/schools - Swinburne University



--

>> Witty sig goes HERE <<

Mark Kelly
[https://docs.google.com/uc?export=download&id=0B4DRNqu3Y8sZMzZhNVhJS3NEXzQ&revid=0B4DRNqu3Y8sZaGY5bUlSU2ZmUlhVYTdLKzBCMGtXdkZhaTBVPQ]
http://vceit.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20150612/4ee951d1/attachment.html 


More information about the sofdev mailing list