Wrox Programmer Forums
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 15th, 2004, 06:18 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default Looking Up an Array

Hi,

   Okay, one last try at getting help from this web site...

   It seems to me that the value of an array would be in associating items, and looking up one item, and returning the associated item. Ex:
Array
Column0 Column1
Printer A IP Address A
Printer B IP Address B
...

   I can figure out how to look up Printer A, for example, but none of the many books I have on vbscript show how to return the corresponding IP Address A. They all show you how to build a 1 dimensional array, and how to loop through it, then how to build a 2 dimensional array, and that's it.

   Does anyone on this site know how to do this? I have only ever had one person reply to a post, and their response was vague.

Thanks,
mmcdonal

mmcdonal
__________________
mmcdonal

Look it up at: http://wrox.books24x7.com
Reply With Quote
  #2 (permalink)  
Old June 15th, 2004, 11:51 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Mr Rude,

1. You asked this only a few hours ago and you didn't get an answer... so you rant in the feedback forum. We do this because we want to. Not because we are paid to. If you want "priority" support- please feel free to pay for it. Volunteers, which we all are, do the best we can as time permits. The forums you will get answers "faster" and "better" on charge for this service.

2. If you can search the array and find the row that printer A is on, you simply have to look in the second position to find the IP address

myArray:
Code:
+----+-------------+--------------+
|    |      0      |       1      |
+----+-------------+--------------+
| 0  |  Printer A  | 192.168.0.10 |
| 1  |  Printer B  | 192.168.0.11 |
| 2  |  Printer C  | 192.168.0.12 |
+----+-------------+--------------+
If I find Printer B at myArray(1,0) then I know the IP address is at myArray(1,1)

So, what is your question? Or do you just want to complain?


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
Reply With Quote
  #3 (permalink)  
Old June 15th, 2004, 03:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Are you saying I am jobless? At the moment I am employed- I was unemployed at one point... I help people when I can.. I don't tolerate complainers who don't understand that this isn't something that they are owed.

This guy acts like we OWE him the answers.. and sometimes we just can't help.


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
Reply With Quote
  #4 (permalink)  
Old June 15th, 2004, 04:48 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Vijay,

Did they fire you?? Otherwise I am not sure what you're talking about..... ;)


Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #5 (permalink)  
Old June 15th, 2004, 05:05 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Okay. Shouldn't have come in. Sorry about that. I am out.
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Convering a String Array to an Integer array nkrust C# 9 November 17th, 2010 12:02 PM
Go from 2d Array to 1d array without defining type OneQuestion General .NET 1 January 10th, 2008 11:13 AM
error when sorting an Array of Array nancy VBScript 2 February 17th, 2005 12:57 PM
Passing php array values to javascript array gkrishna Pro PHP 0 November 6th, 2004 03:20 AM
Array to Array comparison pavel Pro VB 6 0 March 24th, 2004 06:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.