Help with thw sort command 
Author Message
 Help with thw sort command

DIM NFile AS STRING
DIM MYARRAY (1 TO 99) AS STRING
DIM COUNT AS INTEGER

CLS
COUNT = 0
On Error Resume Next
NFile = Dir$("C:\PCB\USE\*.TXT")
While Len(NFile) > 0
COUNT = COUNT + 1
PRINT NFile
MYARRAY(COUNT) = NFile
NFile = Dir$
WEND

CLS
FOR X = 1 TO 99
PRINT MYARRAY(X),
DELAY 0.65
IF MYARRAY(X) = "" THEN GOTO Fin ELSE
NEXT X
Fin:
LOCATE 18,1: PRINT "DONE:"
LOCATE 7,1
PRINT "SORTING"

This command gives me a syntax error at  ( + ... + )
but I am following the example directly from book
'C$ = CHR$(0) + CHR$(1) + ... + CHR$(254) + CHR$(255)
'ARRAY SORT MYARRAY(), COLLATE UCASE, C$

FOR Y = 1 TO 99
PRINT MYARRAY(Y),
IF MYARRAY(Y) = "" THEN GOTO Fin1 ELSE
DELAY 0.65
NEXT Y
Fin1:
LOCATE 19,1: PRINT "DONE SORT:"



Fri, 21 Nov 2003 02:29:24 GMT  
 Help with thw sort command
Newbie --

Quote:
> This command gives me a syntax error at  ( + ... + )
> but I am following the example directly from book
> 'C$ = CHR$(0) + CHR$(1) + ... + CHR$(254) + CHR$(255)

That code wasn't intended to be compiled as-is, it was intended to
communicate a concept.

The elipsis (...) is intended to indicate that you need to fill in
everything between CHR$(1) and CHR$(254) in order to create a string
that contains 256 characters, each of which has the ASCII value of its
position in the string, minus 1.  The first character is CHR$(0), the
second is CHR$(1), and so on.

HTH.

-- Eric Pearson, Perfect Sync Software



Fri, 21 Nov 2003 04:27:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Bubble sort/Selection sort help neded.

2. Qsort, Merge sort, Radix sort in prolog Help!

3. scroll bar of thw browse doesn't work

4. sort command for win32

5. sorting command

6. sort command does not work in Tcl 8.1

7. Command Table Help - trying to define alternate command for SCRNAME

8. Help with a .sh command to Tcl command?

9. HELP: geometry command within destory command

10. Sort (List sorts...)

11. UNIX sort exponents (bc|sort)

12. Binary Sort/Merge Sort in awk

 

 
Powered by phpBB® Forum Software