develooper Front page | perl.beginners | Postings from September 2009

Re: Fw: AW: Hash of Hashes

Thread Previous | Thread Next
From:
Uri Guttman
Date:
September 29, 2009 22:22
Subject:
Re: Fw: AW: Hash of Hashes
Message ID:
87ljjxyplc.fsf@quad.sysarch.com
>>>>> "SD" == Soham Das <sohamdas@yahoo.co.in> writes:
  >> hashes have no positions, just keys. again. try to use standard
  >> terminology or you won't convey any proper meaning here. programming
  >> requires this to be accurate. and yes, you have been making a bunch of
  >> hash/array mistakes and you must fix that in your head. they are similar
  >> in syntax styles in some ways (e.g. [] vs {}) but very different in
  >> semantics and terminology.


  SD> Now what I wrote, was not describing what that statement is
  SD> supposed to do, but the english transliteration of that
  SD> statement. i.e the hash position will convey me the record of my
  SD> positions.  Hence my position in a particular scrip on a
  SD> particular date (which will act as keys) will give me some value,
  SD> which will stand for the number of shares I was holding.

you are still inventing terms and not using standard ones. there is no
hash position. i think you mean slot or entry which are commonly used
for where a hash stores the value associated with a key. but that has
nothing to do with a position in a script nor a date. it will help you
enormously if you use the common terms for perl things. hashes have keys
and values. values are stored in slots or entries (arrays or
hashes). array slots are accessed by an integer index (or sequentially
in a loop) and hash slots are accessed by a string key.

read perldoc perldsc, perllol for more on perl data structures and how
to create and access them.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About