solostyle
(Fresh Scripter)
2004-07-20 11:08 PM
accessing array elements

all right hi folks.. all my comments are below
Code:

;so there's these two arrays
$num = "1","2","3"
$alph = "a","b","c"
;
;
;and i wanna write them to a file
for $i = 0 to ubound($num)
shell "%comspec% /cecho $num($i),$alph($i) >> someFile.txt"
next


but my file will say:
Quote:


$num(1),$alph(1)
$num(2),$alph(2)
$num(3),$alph(3)





What I want is:
Quote:


1,a
2,b
3,c





What's annoying is that I just can't find any documentation of accessing elements that actually works. This should be easy as pie.
Thanks for any help!


ShawnAdministrator
(KiX Supporter)
2004-07-20 11:11 PM
Re: accessing array elements

Might try:

shell "%comspec% /c echo "+$num[$i] + "," + $alph[$i] +" >> someFile.txt"

[untested]

-Shawn



solostyle
(Fresh Scripter)
2004-07-20 11:18 PM
Re: accessing array elements

yeah baby. you rock. it worked!

ShawnAdministrator
(KiX Supporter)
2004-07-21 01:15 AM
Re: accessing array elements

hehee, I rock ... Glad to help. Kix on my brother!

NTDOCAdministrator
(KiX Master)
2004-07-21 01:20 AM
Re: accessing array elements

Think he meant you were thick headed or something. You a ROCK

ShawnAdministrator
(KiX Supporter)
2004-07-21 03:43 AM
Re: accessing array elements

Ohhhh, I see. That would be a bad thing then. Solo - I am not a rock!

NTDOCAdministrator
(KiX Master)
2004-07-21 03:55 AM
Re: accessing array elements

No, I was just kidding. Love ya man, don't knock Solo

Sealeopard
(KiX Master)
2004-07-21 04:16 AM
Re: accessing array elements

Please watch your language!

Les
(KiX Master)
2004-07-21 04:18 AM
Re: accessing array elements

Guys,
Get a room, eh!


LonkeroAdministrator
(KiX Master Guru)
2004-07-21 08:23 AM
Re: accessing array elements

with many windows, so we can watch.

solostyle
(Fresh Scripter)
2004-07-22 02:49 PM
Re: accessing array elements

Hahaha.. this is great. I just joined this forum, and I'm glad I did. Hi everyone! *Wave* My boss just realized I could code, and now I'm writing kixtart scripts for our network. Movin on up!

It looks like Moderators dominate this place! *Shiver* So many rocks!

OH, by the way, I'm female. Not that I can't still be your brother!


JochenAdministrator
(KiX Supporter)
2004-07-22 03:02 PM
Re: accessing array elements

well,

I think it is quite normal that Mods are the most active users on forums.
If only MCA was here to tell us how many percent of posts are caused by mods here


JochenAdministrator
(KiX Supporter)
2004-07-22 03:18 PM
Re: accessing array elements

hmmm ... simple calculation but quite impressing numbers

Total posts on board : 120647 (Moderators forum excluded )
Total posts by Mods : 75460

Percentage of Mods Posts : 61,77


solostyle
(Fresh Scripter)
2004-07-22 03:20 PM
Re: accessing array elements

what's the percentage of moderators out of the total number of registered members?

JochenAdministrator
(KiX Supporter)
2004-07-22 03:23 PM
Re: accessing array elements

there are 6089 registered Users with 'only' 13 Moderators.

That'd be 0.21 %

[Note to the Rocks: NO, I won't be the new board statistic]


LonkeroAdministrator
(KiX Master Guru)
2004-07-22 06:21 PM
Re: accessing array elements

so, lets calc...
Total posts on board: 120647
Posts by Lonkero: 12561

Lonkero has posted 10,41% of all posts.

so, the 6000 other users are equal of 10 Lonkero's
just kidding.
the others post some related, I just complain how my vodka has ran out


solostyle
(Fresh Scripter)
2004-07-22 07:27 PM
Re: accessing array elements



Sealeopard
(KiX Master)
2004-07-23 03:16 AM
Re: accessing array elements

And what's the SNR (signal-to-noise ratio) in posts made by Moderators? ;-)

LonkeroAdministrator
(KiX Master Guru)
2004-07-23 10:05 AM
Re: accessing array elements

27Db?

NTDOCAdministrator
(KiX Master)
2004-07-23 10:16 AM
Re: accessing array elements

127 ?

Sealeopard
(KiX Master)
2004-07-24 02:51 AM
Re: accessing array elements

88 ;-)