Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 11th, 2007, 1:47 PM   #1
hush
Programmer
 
hush's Avatar
 
Join Date: Feb 2006
Location: 127.0.0.1
Posts: 35
Rep Power: 0 hush is on a distinguished road
Interpolation

I was learning hashes and one part has really confused me. I think that i may have misunderstood the concept of interpolation.

I wanted to print a value in the hash table so i used the code:

print "$family_name{$given_name}\n";

what I would expect however is the code to be as followed:

print "$family_name{“$given_name”}\n";

As i am referencing the value of the variable “given_name” rather then the variable itself; thus i would expect the double quote marks so that the variable is interpolated (
and the value of the variable is used in the expression ).

I hope that this makes sense. I will be happy to clarify any points that are unclear.
hush is offline   Reply With Quote
Old Nov 1st, 2007, 8:20 PM   #2
fahlyn
Newbie
 
Join Date: Nov 2007
Posts: 15
Rep Power: 0 fahlyn is on a distinguished road
Re: Interpolation

what exactly were you trying to accomplish with the question marks.
fahlyn is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! linear interpolation enjoikr3w Visual Basic .NET 2 Apr 26th, 2006 1:22 AM
interpolation search on a million EverLearning C 24 Jun 15th, 2005 2:42 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC