Page 1 of 1 1
Topic Options
#77915 - 2001-06-07 01:10 PM KIX 2001 Bug?
Anonymous
Unregistered


Can someone verify that the following script runs on kix v 3.62 and not under kix2001 beta 2?

$rc = dir( "c:\*" )

while ($rc <> "") and (@ERROR = 0)
? $rc
$rc = dir()
loop

Under kix 3.62, the entire list is displayed, under 2001 only the first entry.

Strangely enough, if you remove the $rc = frmo the dir() line, it works under 2001.

Julian

Top
#77916 - 2001-06-07 01:58 PM Re: KIX 2001 Bug?
Anonymous
Unregistered


Maybe it's a correction really ...

The documentation lists this example for both versions ...

So I'm supprised it works in the prev. version.
--------------------------------------------------------------------------------
Dir( )

Action: Dir can be used to enumerate the files in a directory. Dir returns a string representing the name of a file, directory, or folder that matches a specified pattern. To retrieve subsequent entries in a directory, specify an empty string (“”) as the path.

Syntax: DIR ("path", index)

Parameters: Path
Optional string that specifies a file name — may include directory or folder, and drive. If path is empty (“”), Dir will return the next file of the previously opened enumeration handle. Wildcards (‘*’ and ‘?’) are supported.

Index

Optional number indicating which enumeration handle to use. The Dir function can enumerate two directories at the same time. To open the second enumeration handle, specify 1 for the index.

Returns: Returns a string representing the name of a file, directory, or folder that matches a specified pattern. An empty string ("") is returned if path is not found or to indicate that the end of the current enumration was reached. Dir also sets the value of @ERROR : 0 Dir successful.
Error code Function failed.


Example:

$FileName = Dir("C:\TEMP")
While $FileName <> “” and @ERROR = 0
? $FileName
Dir() ; retrieve next file
Loop
--------------------------------------------------------------------------------

[This message has been edited by Strψm (edited 07 June 2001).]

Top
#77917 - 2001-06-07 03:30 PM Re: KIX 2001 Bug?
cj Offline
MM club member
*****

Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
Dudes,

Check out this post.

cj

------------------
cj's scripts page
cj's User Guide - 14 May 2001

chrismat@ozemail.com.au

Top
#77918 - 2001-07-01 06:16 PM Re: KIX 2001 Bug?
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Works fine in Kixtart 4.00 RC1 release. There was a link broken.
Greetings.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 1 of 1 1


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

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

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