selecting_20multiple_20files
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
selecting_20multiple_20files [2018/03/31 13:19] – external edit 127.0.0.1 | selecting_20multiple_20files [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Selecting multiple files===== | =====Selecting multiple files===== | ||
- | //by Richard Russell, March 2010//\\ \\ The main [[http:// | + | //by Richard Russell, March 2010//\\ \\ The main [[http:// |
+ | |||
+ | <code bb4w> | ||
DIM files$(100) | DIM files$(100) | ||
filter$ = "All files" | filter$ = "All files" | ||
Line 10: | Line 12: | ||
NEXT | NEXT | ||
ENDIF | ENDIF | ||
- | If you want to sort the returned filenames into ascending alphabetical order you can easily do that using the SORTLIB library:\\ | + | </ |
+ | |||
+ | If you want to sort the returned filenames into ascending alphabetical order you can easily do that using the SORTLIB library: | ||
+ | |||
+ | <code bb4w> | ||
INSTALL @lib$+" | INSTALL @lib$+" | ||
sort% = FN_sortinit(0, | sort% = FN_sortinit(0, | ||
C% = num% | C% = num% | ||
CALL sort%, files$(1) | CALL sort%, files$(1) | ||
- | Here is the function itself:\\ | + | </ |
+ | |||
+ | Here is the function itself: | ||
+ | |||
+ | <code bb4w> | ||
DEF FNselectfiles(title$, | DEF FNselectfiles(title$, | ||
LOCAL fs{}, fp%, res%, nfiles%, P%, J% | LOCAL fs{}, fp%, res%, nfiles%, P%, J% | ||
Line 54: | Line 64: | ||
ENDIF | ENDIF | ||
=nfiles% | =nfiles% | ||
+ | </ | ||
+ | |||
The maximum number of files which may be returned is limited by the size of the supplied array, and by the total size of all the filenames not exceeding 65535 bytes. | The maximum number of files which may be returned is limited by the size of the supplied array, and by the total size of all the filenames not exceeding 65535 bytes. |
selecting_20multiple_20files.1522502380.txt.gz · Last modified: 2024/01/05 00:16 (external edit)