Page 1 of 1 1
Topic Options
#130767 - 2004-12-07 05:42 PM Where is this zero coming from?
Josh_R Offline
Getting the hang of it

Registered: 2003-11-25
Posts: 54
I know I am stupid but I can not figure out where this the zero is coming from that is attached to the last record when I run this script!

$RC=RedirectOutput ("c:\names.txt", 1)

If Open(3, @LDRIVE + "usernames.txt") = 0
$x = ReadLine(3)
While @ERROR = 0
? "e:\imail\adduser -h vzw.afni.net -u " + $x + "-p america"
$x = ReadLine(3)
Loop
Close (3)
Else
Beep
? "Config file not opened, error code: [" + @ERROR + "]"
EndIf

Top
#130768 - 2004-12-07 05:45 PM Re: Where is this zero coming from?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
From Close (3)


try $rc=close(3)


Close( )

Action: Closes a file previously opened by the Open function.

Syntax: Close (FileHandle)

Parameters: FileHandle
A numeric expression indicating the handle number of the file to close. Possible values range from 1 to 10.

Returns: 0 File Closed
-2 Invalid File Number Specified


See Also: FreeFileHandle( ), Open( ), ReadLine( ), WriteLine( )

Example: If Close(3)
Beep
? "Error closing file!"
EndIf

_________________________
Home page: http://www.kixhelp.com/hb/

Top
#130769 - 2004-12-07 05:47 PM Re: Where is this zero coming from?
Josh_R Offline
Getting the hang of it

Registered: 2003-11-25
Posts: 54
Thanks!
Top
#130770 - 2004-12-07 08:10 PM Re: Where is this zero coming from?
NTDOC Administrator Online   content
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
See also from our FAQ section here on the board.

Why does the console display zeros and ones (amongst others)?
http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=81592

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1471 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.137 seconds in which 0.074 seconds were spent on a total of 12 queries. Zlib compression enabled.

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