Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
number of entries in array
Name: raviepic3 Date: October 21, 2008 at 11:22:37 Pacific OS: Xp CPU/Ram: 512 Product: new
Comment:
length gives us the overall size of array ryt ?
need to get the number of entries alone from an array
Name: shutat Date: October 21, 2008 at 19:24:02 Pacific
Reply:
You can instantiate a container of whatever size, but to find out where the valid data is, you'd be better off maintaining an index, and increment or decrement it when you add or remove data.
What language are you using?
0
Response Number 2
Name: raviepic3 Date: October 21, 2008 at 23:39:01 Pacific
Reply:
java script
programming newbie :)
0
Response Number 3
Name: shutat Date: October 21, 2008 at 23:58:39 Pacific
Reply:
How about
<html><head><script language="javascript1.2">
var arr = new Array(); for(var i=0; i < 5; i++) { arr.push(i); } alert(arr.length); arr.pop(); alert(arr.length);
</script></head><body></body></html>
That sort of thing will give you the length of your significant data.
Look into shift and unshift as well as they work on the first element in the array whereas push and pop work on the last element.
HTH
0
Response Number 4
Name: raviepic3 Date: October 22, 2008 at 01:50:43 Pacific
Summary: I haven't used VBS before, but if it has the function split, then you could use it to find the number of words in a string. Here's a VB6 example: Dim s As String Dim w As Variant s = "this is a str...
Summary: Hi, I'm having a bit of trouble editing the prices in a price list for a site I've created... I've created the form and table for the actual prices to be typed in and sent to the processing page but I...
Summary: I use Frontpage Express XP version for editing my websites. My outpage is http://www.cleddau.com/guestbookview.html I'm looking for a way to restrict the number of characters that are displayed on a l...