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

Re: Fw: AW: Hash of Hashes

Thread Previous | Thread Next
Uri Guttman
September 29, 2009 22:22
Re: Fw: AW: Hash of Hashes
Message ID:
>>>>> "SD" == Soham Das <> 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 Guttman  ------  -------- --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ---- ---------

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About