Page 1 of 2 12>
Topic Options
#123388 - 2004-07-20 11:08 PM accessing array elements
solostyle Offline
Fresh Scripter

Registered: 2004-07-20
Posts: 15
Loc: maryland, us
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!
_________________________
kickin it solo

Top
#123389 - 2004-07-20 11:11 PM Re: accessing array elements
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Might try:

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

[untested]

-Shawn


Top
#123390 - 2004-07-20 11:18 PM Re: accessing array elements
solostyle Offline
Fresh Scripter

Registered: 2004-07-20
Posts: 15
Loc: maryland, us
yeah baby. you rock. it worked!
_________________________
kickin it solo

Top
#123391 - 2004-07-21 01:15 AM Re: accessing array elements
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
hehee, I rock ... Glad to help. Kix on my brother!
Top
#123392 - 2004-07-21 01:20 AM Re: accessing array elements
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Think he meant you were thick headed or something. You a ROCK
Top
#123393 - 2004-07-21 03:43 AM Re: accessing array elements
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Ohhhh, I see. That would be a bad thing then. Solo - I am not a rock!
Top
#123394 - 2004-07-21 03:55 AM Re: accessing array elements
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
No, I was just kidding. Love ya man, don't knock Solo
Top
#123395 - 2004-07-21 04:16 AM Re: accessing array elements
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Please watch your language!
_________________________
There are two types of vessels, submarines and targets.

Top
#123396 - 2004-07-21 04:18 AM Re: accessing array elements
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Guys,
Get a room, eh!
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#123397 - 2004-07-21 08:23 AM Re: accessing array elements
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
with many windows, so we can watch.
_________________________
!

download KiXnet

Top
#123398 - 2004-07-22 02:49 PM Re: accessing array elements
solostyle Offline
Fresh Scripter

Registered: 2004-07-20
Posts: 15
Loc: maryland, us
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!
_________________________
kickin it solo

Top
#123399 - 2004-07-22 03:02 PM Re: accessing array elements
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
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
_________________________



Top
#123400 - 2004-07-22 03:18 PM Re: accessing array elements
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
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
_________________________



Top
#123401 - 2004-07-22 03:20 PM Re: accessing array elements
solostyle Offline
Fresh Scripter

Registered: 2004-07-20
Posts: 15
Loc: maryland, us
what's the percentage of moderators out of the total number of registered members?
_________________________
kickin it solo

Top
#123402 - 2004-07-22 03:23 PM Re: accessing array elements
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
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]
_________________________



Top
#123403 - 2004-07-22 06:21 PM Re: accessing array elements
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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
_________________________
!

download KiXnet

Top
#123404 - 2004-07-22 07:27 PM Re: accessing array elements
solostyle Offline
Fresh Scripter

Registered: 2004-07-20
Posts: 15
Loc: maryland, us
_________________________
kickin it solo

Top
#123405 - 2004-07-23 03:16 AM Re: accessing array elements
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
And what's the SNR (signal-to-noise ratio) in posts made by Moderators? ;-)
_________________________
There are two types of vessels, submarines and targets.

Top
#123406 - 2004-07-23 10:05 AM Re: accessing array elements
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
27Db?
_________________________
!

download KiXnet

Top
#123407 - 2004-07-23 10:16 AM Re: accessing array elements
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
127 ?
Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 262 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.077 seconds in which 0.025 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org