home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / CLIPPER / NFTROFF / 6.TR < prev    next >
Text File  |  1993-12-01  |  16KB  |  958 lines

  1. .de }n
  2. .bp
  3. .sp .5i
  4. ..
  5. .wh -.8i }n
  6. .sp .5i
  7. .po -.4i
  8. .ll 7.5i
  9. .ps 9
  10. .vs 9
  11. .in 0i
  12. .ta 1.63265i
  13. .sp 2
  14. .ne 20
  15. .ps +3
  16. .vs +3
  17. FT_COM3OR4()    Enable use of COM3 and/or COM4 on IBM/PC compatables\.
  18. .br
  19. .ta
  20. .in 0.08i
  21. .ps -3
  22. .vs -3
  23. .sp 2
  24. \fBFT_COM3OR4()
  25. Enable use of COM3 and/or COM4 on IBM/PC compatables\.
  26. .in 0i
  27. .br
  28. \l'6.24i'
  29. .br
  30. .sp
  31. .in 0.08i
  32. \fBSyntax
  33. .sp
  34. .in 0.4i
  35. \fBFT_COM3OR4( <nPort> ) -> lSuccess
  36. .sp
  37. .in 0.08i
  38. \fBArguments
  39. .sp
  40. .in 0.4i
  41. \fB<nPort>\fR is the COM port to enable\.  Ports except 3 and 4 are ignored\.
  42. The default is 3\.
  43. .sp
  44. .in 0.08i
  45. \fBReturns
  46. .sp
  47. .in 0.4i
  48. a logical indicating success or failure of the operation\.
  49. .sp
  50. .in 0.08i
  51. \fBDescription
  52. .sp
  53. .in 0.4i
  54. FT_COM3OR4() uses FT_POKE() to write to memory the correct data
  55. to enable COM3 or COM4 on IBM-PC compatables\.  The programmer will
  56. still need to explicitly open the port with SET PRINTER or FOPEN()
  57. to send data out the port\.
  58. .sp
  59. FT_COM3OR4() owes everything to FT_POKE()\.
  60. .sp
  61. .in 0.08i
  62. \fBExamples
  63. .sp
  64. .in 0.4i
  65. .br
  66. // attempt to enable COM3
  67. .br
  68. IF FT_COM3OR4( 3 )
  69. .in 0.64i
  70. .br
  71. Qout("COM3 was enabled")
  72. .in 0.4i
  73. .br
  74. END
  75. .sp
  76. .sp
  77. .in 0.08i
  78. \fBSource:\fR COM34\.PRG
  79. .sp
  80. \fBAuthor:\fR Steve Kolterman
  81. .in 0i
  82. .ta 1.63265i
  83. .sp 2
  84. .ne 20
  85. .ps +3
  86. .vs +3
  87. FT_DIR2DB()    Create \.DBF of directory files, using DOS filespec
  88. .br
  89. .ta
  90. .in 0.08i
  91. .ps -3
  92. .vs -3
  93. .sp 2
  94. \fBFT_DIR2DB()
  95. Create \.DBF of directory files, using DOS filespec
  96. .in 0i
  97. .br
  98. \l'6.24i'
  99. .br
  100. .sp
  101. .in 0.08i
  102. \fBSyntax
  103. .sp
  104. .in 0.4i
  105. \fBFT_DIR2DB( <cSpec> [, <cDbf> ][, <cNtx> ][, <cDrvr> ] ) -> <nErrcode>
  106. .sp
  107. .in 0.08i
  108. \fBArguments
  109. .sp
  110. .in 0.4i
  111. \fB<cSpec>\fR can be any valid DOS file spec\., including wildcards and
  112. .in 0.48i
  113. single file names\.
  114. .sp
  115. .in 0.4i
  116. \fB<cDbf>\fR is the name of the \.DBF to create\.  If not specified, the
  117. .in 0.48i
  118. name \'FILES\' is used\.
  119. .sp
  120. .in 0.4i
  121. \fB<cNtx>\fR is the name of the \.NTX to create\.  If not specified, no
  122. .in 0.48i
  123. index is created\.
  124. .sp
  125. .in 0.4i
  126. \fB<cDrvr>\fR is the name of the Nantucket RDD (replaceable database
  127. .in 0.48i
  128. driver) to use\.  If not specified, the default, \'DBFNTX\', is
  129. used\.
  130. .sp
  131. .in 0.08i
  132. \fBReturns
  133. .sp
  134. .in 0.4i
  135. <nErrcode>, which will be one of the following:
  136. .sp
  137. .in 0.64i
  138. .br
  139. 0 - no error
  140. .br
  141. 1 - no file spec\. passed
  142. .br
  143. 2 - no files match spec\. passed
  144. .br
  145. 3 - network error opening <cDbf>
  146. .sp
  147. .in 0.08i
  148. \fBDescription
  149. .sp
  150. .in 0.4i
  151. FT_DIR2DB() builds a \.DBF from and fills it with the files/data
  152. matching any valid DOS file spec\.  Fields created are \'Name\',
  153. \'Size\', \'Date\', \'Time\', and \'Attr\' (attribute)\.
  154. .sp
  155. An index on the \'name\' field is also created by passing a name
  156. for the \.NTX as a third parameter\.  An optional fourth parameter
  157. accommodates the RDDs (replaceable database drivers) Nantucket
  158. promises\.
  159. .sp
  160. .in 0.08i
  161. \fBExamples
  162. .sp
  163. .in 0.4i
  164. nVal:= FT_DIR2DB( "*\.dbf","dbffiles","filename" )
  165. Creates DBFFILES\.DBF consisting of all \.DBFs in the current dir-
  166. ectory, and also creates FILENAME\.NTX\.
  167. .sp
  168. nVal:= FT_DIR2DB( "*\.*","pdoxdbf","pdoxntx","paradox" )
  169. would create a Paradox database and index consisting of all files
  170. in the current directory\.
  171. .sp
  172. .in 0.08i
  173. \fBSource:\fR DIR2DBF\.PRG
  174. .sp
  175. \fBAuthor:\fR Steve Kolterman
  176. .in 0i
  177. .ta 1.63265i
  178. .sp 2
  179. .ne 20
  180. .ps +3
  181. .vs +3
  182. FT_EXIST()    Test for existence of drive and/or subdirectory
  183. .br
  184. .ta
  185. .in 0.08i
  186. .ps -3
  187. .vs -3
  188. .sp 2
  189. \fBFT_EXIST()
  190. Test for existence of drive and/or subdirectory
  191. .in 0i
  192. .br
  193. \l'6.24i'
  194. .br
  195. .sp
  196. .in 0.08i
  197. \fBSyntax
  198. .sp
  199. .in 0.4i
  200. \fBFT_EXIST( <cDriveDir> ) -> lResult
  201. .sp
  202. .in 0.08i
  203. \fBArguments
  204. .sp
  205. .in 0.4i
  206. \fB<cDriveDir>\fR is a character string containing drive spec (with colon)
  207. .in 0.64i
  208. or drive spec and path to and including subdirectory being
  209. tested for\.  Do not include backslash after subdirectory\.  If
  210. drive spec is not part of string, tests current drive\.
  211. .sp
  212. .in 0.08i
  213. \fBReturns
  214. .sp
  215. .in 0.4i
  216. .ta 0.88i
  217. <lResult>    as logical -
  218. .br
  219. .ta
  220. .in 0.64i
  221. .br
  222. \.T\. if drive exists, or subdirectory exists on specified drive
  223. .br
  224. \.F\. if drive or subdirectory does not exist
  225. .sp
  226. .in 0.08i
  227. \fBDescription
  228. .sp
  229. .sp
  230. .sp
  231. \fBExamples
  232. .sp
  233. .in 0.32i
  234. IF FT_EXIST( "D:" )
  235. .in 0.56i
  236. Qout("OK To Perform Operation On Drive D:")
  237. .in 0.32i
  238. ENDIF
  239. .sp
  240. .in 0.08i
  241. \fBSource:\fR EXIST\.PRG
  242. .sp
  243. \fBAuthor:\fR Steve Kolterman
  244. .in 0i
  245. .ta 1.63265i
  246. .sp 2
  247. .ne 20
  248. .ps +3
  249. .vs +3
  250. FT_GETE()    Return the entire current environment
  251. .br
  252. .ta
  253. .in 0.08i
  254. .ps -3
  255. .vs -3
  256. .sp 2
  257. \fBFT_GETE()
  258. Return the entire current environment
  259. .in 0i
  260. .br
  261. \l'6.24i'
  262. .br
  263. .sp
  264. .in 0.08i
  265. \fBSyntax
  266. .sp
  267. .in 0.4i
  268. \fBFT_GETE( [ @<xReceiveVar> ] ) -> nNumStrings
  269. .sp
  270. .in 0.08i
  271. \fBArguments
  272. .sp
  273. .in 0.4i
  274. \fB<xReceiveVar>\fR is the variable to receive the environment data\.
  275. .sp
  276. \fB<xReceiveVar>\fR can be a character type variable, in which case
  277. the function will place all environment strings in the variable
  278. separated by carriage return/line feeds (chr 13 + chr(10))\.
  279. .sp
  280. \fB<xReceiveVar>\fR can be an array type, in which case the function
  281. will place each string in an array element\.  The array MUST be
  282. declared with the proper number of elements prior to passing it
  283. to the function\.  This can be done by calling FT_GETE() without
  284. parameters first to get the number of strings in the environment\.
  285. .sp
  286. Note that the argument MUST be passed by reference\. Since arrays
  287. are by nature passed by reference, the "@" symbol is optional when
  288. passing an array\.
  289. .sp
  290. If no argument is passed, FT_GETE() merely returns the number
  291. of strings in the environment\.
  292. .sp
  293. .in 0.08i
  294. \fBReturns
  295. .sp
  296. .in 0.4i
  297. FT_GETE() returns the total number of strings found in the
  298. current program\'s environment\.
  299. .sp
  300. .in 0.08i
  301. \fBDescription
  302. .sp
  303. .in 0.4i
  304. This function stores ALL of the current program\'s environment
  305. variables in either a block of text lines or in an array\.  It is
  306. useful for looking at the entire environment at once, or recording
  307. a snapshot of it to a file for later inspection, such as when a
  308. program error occurs\.  If the value of ONE SPECIFIC variable is
  309. desired, use Clipper\'s built-in GETE() function\.
  310. .sp
  311. This function uses the undocumented internal variable "_environ",
  312. as well as the functions _strcpy(), _strcat(), and _strlen() from
  313. CLIPPER\.LIB
  314. .sp
  315. .in 0.08i
  316. \fBExamples
  317. .sp
  318. .in 0.4i
  319. Get the environment in text form and browse it:
  320. .sp
  321. .in 0.64i
  322. .ta 0.96i
  323. .br
  324. cEnvBlock    := ""
  325. .br
  326. .ta
  327. .br
  328. nNumStrings := FT_GETE(@cEnvBlock)
  329. .ta 0.24i
  330. .br
  331. @    0, 0 to MAXROW() - 1, MAXCOL()
  332. .br
  333. .ta
  334. .ta 0.24i
  335. .br
  336. @    MAXROW(), 0 say \'Browse strings, press ESC to exit\.\.\.\'
  337. .br
  338. .ta
  339. .br
  340. MEMOWRIT(cEnvBlock, 1, 1, MAXROW() - 2,MAXCOL() - 1, \.F\.)
  341. .sp
  342. .in 0.4i
  343. Get the environment in text form and write it to a file:
  344. .sp
  345. .in 0.64i
  346. .br
  347. cEnvBlock := ""
  348. .br
  349. FT_GETE(@cEnvBlock)
  350. .br
  351. MEMOWRIT("ENVIRON\.TXT", cEnvBlock)
  352. .sp
  353. .in 0.4i
  354. Get the environment in Array form:
  355. .sp
  356. .in 0.64i
  357. .br
  358. aEnvArray := ARRAY(FT_GETE())
  359. .br
  360. FT_GETE(aEnvArray)
  361. .ta 1.68i
  362. .br
  363. ? aEnvArray[1]    // "COMSPEC=C:\\COMMAND\.COM"
  364. .br
  365. .ta
  366. .ta 1.68i
  367. .br
  368. ? aEnvArray[2]    // "PATH=C:\\;C:\\DOS;C:\\UTIL;C:\\CLIP50\\BIN"
  369. .br
  370. .ta
  371. .in 0.8i
  372. .br
  373. \.\.\. etc \.\.\.
  374. .sp
  375. .in 0.08i
  376. \fBSource:\fR GETENVRN\.C
  377. .sp
  378. \fBAuthor:\fR Rick Whitt
  379. .in 0i
  380. .ta 1.63265i
  381. .sp 2
  382. .ne 20
  383. .ps +3
  384. .vs +3
  385. FT_LINKED()    Determine if a function was linked in
  386. .br
  387. .ta
  388. .in 0.08i
  389. .ps -3
  390. .vs -3
  391. .sp 2
  392. \fBFT_LINKED()
  393. Determine if a function was linked in
  394. .in 0i
  395. .br
  396. \l'6.24i'
  397. .br
  398. .sp
  399. .in 0.08i
  400. \fBSyntax
  401. .sp
  402. .in 0.4i
  403. \fBFT_LINKED( <cString> ) -> lResult
  404. .sp
  405. .in 0.08i
  406. \fBArguments
  407. .sp
  408. .in 0.4i
  409. \fB<cString>\fR is a character string containing one or more function
  410. .in 1.2i
  411. calls
  412. .sp
  413. .in 0.08i
  414. \fBReturns
  415. .sp
  416. .in 0.4i
  417. \.T\. if all functions within the string are currently linked into
  418. the application, \.F\. if one or more aren\'t\.  See below for a
  419. definition of "function\."
  420. .sp
  421. .in 0.08i
  422. \fBDescription
  423. .sp
  424. .sp
  425. .in 0.4i
  426. This function would be used in data driven application to determine
  427. whether or not a macro compiled function was linked in\.
  428. .sp
  429. Several functions can be passed, and nested, in <cString>\.
  430. .sp
  431. Caveat: Some function calls are converted by the preprocessor
  432. into other function calls\. You cannot have these types of
  433. functions in a macro compiled string as they never exist at
  434. runtime\. FT_LINKED will correctly tell you that they are invalid\.
  435. .sp
  436. For instance: there is no function called SORT() in any of the
  437. Nantucket LIBraries, but it is a valid CLIPPER command because the
  438. preprocessor will convert it to other function calls\.
  439. .sp
  440. .sp
  441. .sp
  442. .in 0.08i
  443. \fBExamples
  444. .sp
  445. .sp
  446. .in 0.4i
  447. .br
  448. cString := "FT_GoodFunc(BadFunc(3,2))"
  449. .br
  450. IF FT_LINKED(cString)
  451. .in 0.64i
  452. .br
  453. EVAL( &("{||"+cString+"}") )
  454. .in 0.4i
  455. .br
  456. ELSE
  457. .in 0.64i
  458. .br
  459. ALERT("Error: "+cString+" was not linked in\. Called by FT_LINKED()")
  460. .in 0.4i
  461. .br
  462. ENDIF
  463. .sp
  464. .sp
  465. .sp
  466. .in 0.08i
  467. \fBSource:\fR LINKED\.PRG
  468. .sp
  469. \fBAuthor:\fR Brian Loesgen
  470. .in 0i
  471. .ta 1.63265i
  472. .sp 2
  473. .ne 20
  474. .ps +3
  475. .vs +3
  476. FT_ORIGIN()    Report the drive, path and filename of the executing program
  477. .br
  478. .ta
  479. .in 0.08i
  480. .ps -3
  481. .vs -3
  482. .sp 2
  483. \fBFT_ORIGIN()
  484. Report the drive, path and filename of the executing program
  485. .in 0i
  486. .br
  487. \l'6.24i'
  488. .br
  489. .sp
  490. .in 0.08i
  491. \fBSyntax
  492. .sp
  493. .in 0.32i
  494. \fBFT_ORIGIN() -> cString
  495. .sp
  496. .in 0.08i
  497. \fBArguments
  498. .sp
  499. .in 0.32i
  500. None
  501. .sp
  502. .in 0.08i
  503. \fBReturns
  504. .sp
  505. .in 0.32i
  506. A string containing the full drive/directory/filename of
  507. the currently executing file\.
  508. .sp
  509. .in 0.08i
  510. \fBDescription
  511. .sp
  512. .in 0.32i
  513. Often users will install multiple copies of application software,
  514. especially on networks and in situations where the user is trying
  515. to get around a copy protection scheme\.
  516. .sp
  517. This function enables you to learn the name and source location
  518. of the currently executing file, so that you may take whatever
  519. action you need to\.
  520. .sp
  521. Requires DOS v3\.xx and above\.
  522. .sp
  523. .in 0.08i
  524. \fBExamples
  525. .sp
  526. .in 0.32i
  527. .br
  528. cMyFile := FT_ORIGIN()
  529. .sp
  530. .br
  531. IF cMyFile <> "C:\\APPDIR\\MYFILE\.EXE"
  532. .in 0.56i
  533. .br
  534. ?"Incorrect startup file\.  Please remove/rename and start again"
  535. .br
  536. QUIT
  537. .in 0.32i
  538. .br
  539. ENDIF
  540. .sp
  541. .in 0.08i
  542. \fBSource:\fR ORIGIN\.ASM
  543. .sp
  544. \fBAuthor:\fR Steve Larsen
  545. .in 0i
  546. .sp
  547. .in 1.5i
  548. .ti -1.5i
  549. .ta 1.5i
  550. .ft B
  551. See Also:    
  552. .ft R
  553. FT_WHEREIS()
  554. , FT_TREE()
  555. .ta 1.63265i
  556. .in 0i
  557. .sp 2
  558. .ne 20
  559. .ps +3
  560. .vs +3
  561. FT_RESTSETS()    Restore status of all SET command settings
  562. .br
  563. .ta
  564. .in 0.08i
  565. .ps -3
  566. .vs -3
  567. .sp 2
  568. \fBFT_RESTSETS()
  569. Restore status of all SET command settings
  570. .in 0i
  571. .br
  572. \l'6.24i'
  573. .br
  574. .sp
  575. .in 0.08i
  576. \fBSyntax
  577. .sp
  578. .in 0.4i
  579. \fBFT_RESTSETS( [ <aOldSets> ] ) -> NIL
  580. .sp
  581. .in 0.08i
  582. \fBArguments
  583. .sp
  584. .in 0.4i
  585. aOldSets is an array of SET settings created by FT_SAVESETS()
  586. .sp
  587. .in 0.08i
  588. \fBReturns
  589. .sp
  590. .in 0.4i
  591. NIL
  592. .sp
  593. .in 0.08i
  594. \fBDescription
  595. .sp
  596. .in 0.4i
  597. This function "restores" the SET Settings, i\.e\., it sets them to the
  598. values in the array aOldSets\.  The following SETs are not currently
  599. supported: FILTER, FORMAT, FUNCTION, INDEX, KEYS, MODE, ORDER,
  600. PROCEDURE, RELATION, TYPEAHEAD
  601. .sp
  602. .in 0.08i
  603. \fBExamples
  604. .sp
  605. .in 0.4i
  606. FT_RESTSETS(aOldSets)
  607. .sp
  608. .in 0.08i
  609. \fBHeader File:\fR SET\.CH
  610. .sp
  611. \fBSource:\fR RESTSETS\.PRG
  612. .sp
  613. \fBAuthor:\fR David Husnian
  614. .in 0i
  615. .sp
  616. .in 1.5i
  617. .ti -1.5i
  618. .ta 1.5i
  619. .ft B
  620. See Also:    
  621. .ft R
  622. FT_SAVESETS()
  623. , FT_SETCENTURY()
  624. .ta 1.63265i
  625. .in 0i
  626. .sp 2
  627. .ne 20
  628. .ps +3
  629. .vs +3
  630. FT_SAVESETS()    Save the status of all the SET command settings
  631. .br
  632. .ta
  633. .in 0.08i
  634. .ps -3
  635. .vs -3
  636. .sp 2
  637. \fBFT_SAVESETS()
  638. Save the status of all the SET command settings
  639. .in 0i
  640. .br
  641. \l'6.24i'
  642. .br
  643. .sp
  644. .in 0.08i
  645. \fBSyntax
  646. .sp
  647. .in 0.4i
  648. \fBFT_SAVESETS() -> aOldSets
  649. .sp
  650. .in 0.08i
  651. \fBArguments
  652. .sp
  653. .in 0.4i
  654. None
  655. .sp
  656. .in 0.08i
  657. \fBReturns
  658. .sp
  659. .in 0.4i
  660. An array containing the values of the supported SETs\.
  661. .sp
  662. .in 0.08i
  663. \fBDescription
  664. .sp
  665. .in 0.4i
  666. This function saves the SET Settings, i\.e\., it copies them into an
  667. array, aOldSets\.  The following SETs are not currently supported:
  668. FILTER, FORMAT, FUNCTION, INDEX, KEYS, MODE, ORDER, PROCEDURE,
  669. RELATION, TYPEAHEAD
  670. .sp
  671. .in 0.08i
  672. \fBExamples
  673. .sp
  674. .in 0.4i
  675. aOldSets := FT_SAVESETS()
  676. .sp
  677. .in 0.08i
  678. \fBHeader File:\fR SET\.CH
  679. .sp
  680. \fBSource:\fR SAVESETS\.PRG
  681. .sp
  682. \fBAuthor:\fR David Husnian
  683. .in 0i
  684. .sp
  685. .in 1.5i
  686. .ti -1.5i
  687. .ta 1.5i
  688. .ft B
  689. See Also:    
  690. .ft R
  691. FT_RESTSETS()
  692. , FT_SETCENTURY()
  693. .ta
  694. .in 0i
  695. .sp 2
  696. .ne 20
  697. .ps +3
  698. .vs +3
  699. FT_SETCENTURY() Check/Set the CENTURY Setting
  700. .br
  701. .in 0.08i
  702. .ps -3
  703. .vs -3
  704. .sp 2
  705. \fBFT_SETCENTURY()
  706. Check/Set the CENTURY Setting
  707. .in 0i
  708. .br
  709. \l'6.24i'
  710. .br
  711. .sp
  712. .in 0.08i
  713. \fBSyntax
  714. .sp
  715. .in 0.4i
  716. \fBFT_SETCENTURY( [ <lNewSetState> ] ) -> <lOldState>
  717. .sp
  718. .in 0.08i
  719. \fBArguments
  720. .sp
  721. .in 0.4i
  722. lNewSetState - Boolean to Set CENTURY
  723. .in 1.76i
  724. .br
  725. \.F\. - Toggle CENTURY off
  726. .br
  727. \.T\. - Toggle CENTURY on
  728. .br
  729. If not specified, leave CENTURY as is
  730. .sp
  731. .in 0.08i
  732. \fBReturns
  733. .sp
  734. .in 0.4i
  735. The state of the CENTURY setting upon entry to the routine
  736. .sp
  737. .in 0.08i
  738. \fBDescription
  739. .sp
  740. .in 0.4i
  741. This function returns the state (ON/OFF, TRUE/FALSE) of the CENTURY
  742. and optionally sets it ON or OFF\.
  743. .sp
  744. .in 0.08i
  745. \fBExamples
  746. .sp
  747. .in 0.4i
  748. .ta 2.64i
  749. lOldState := FT_SETCENTURY()    // Get current CENTURY Setting
  750. .br
  751. .ta
  752. .sp
  753. .ta 2.64i
  754. lOldState := FT_SETCENTURY(\.T\.)    // Get the current CENTURY Setting
  755. .br
  756. .ta
  757. .in 3.04i
  758. // and turn it on (set it to TRUE)
  759. .sp
  760. .in 0.4i
  761. .ta 2.64i
  762. lOldState := FT_SETCENTURY(\.F\.)    // Get the current CENTURY Setting
  763. .br
  764. .ta
  765. .in 3.04i
  766. // and turn it off (set it to FALSE)
  767. .sp
  768. .in 0.08i
  769. \fBSource:\fR CNTRYSET\.PRG
  770. .sp
  771. \fBAuthor:\fR David Husnian
  772. .in 0i
  773. .ta 1.63265i
  774. .sp 2
  775. .ne 20
  776. .ps +3
  777. .vs +3
  778. FT_TREE()    Locate all directories and subdirectories on a drive
  779. .br
  780. .ta
  781. .in 0.08i
  782. .ps -3
  783. .vs -3
  784. .sp 2
  785. \fBFT_TREE()
  786. Locate all directories and subdirectories on a drive
  787. .in 0i
  788. .br
  789. \l'6.24i'
  790. .br
  791. .sp
  792. .in 0.08i
  793. \fBSyntax
  794. .sp
  795. .in 0.32i
  796. \fBFT_TREE( [ <cDrive:> ] ) -> aDirectories
  797. .sp
  798. .in 0.08i
  799. \fBArguments
  800. .sp
  801. .in 0.32i
  802. \fB<cDrive:>\fR is an optional drive to search\.  If omitted, FT_TREE()
  803. defaults to the current drive\.
  804. .sp
  805. .in 0.08i
  806. \fBReturns
  807. .sp
  808. .in 0.32i
  809. An array containing the name of each directory found on the specified
  810. drive\.
  811. .sp
  812. .in 0.08i
  813. \fBDescription
  814. .sp
  815. .in 0.32i
  816. Use FT_TREE() to obtain an array of the directory structure of a
  817. specified drive\.
  818. .sp
  819. You may optionally specify a drive to search, other than the current
  820. drive\.  Please note that FT_TREE() will not cause a runtime error if
  821. you specify an invalid or inoperable drive, instead returns an
  822. empty array\.
  823. .sp
  824. The directory structure returned is not ordered in any way other than
  825. the order that the directories are contained in DOS\.  To put the
  826. directories in alphabetical order, use ASORT()\.
  827. .sp
  828. .in 0.08i
  829. \fBExamples
  830. .sp
  831. .in 0.32i
  832. .br
  833. // list all directories on the current drive
  834. .br
  835. aTree := FT_TREE()
  836. .br
  837. Aeval( aTree, {|e| Qout(e) } )
  838. .sp
  839. .in 0.08i
  840. \fBSource:\fR WHEREIS\.PRG
  841. .sp
  842. \fBAuthor:\fR Steve Larsen
  843. .in 0i
  844. .sp
  845. .in 1.5i
  846. .ti -1.5i
  847. .ta 1.5i
  848. .ft B
  849. See Also:    
  850. .ft R
  851. FT_WHEREIS()
  852. , FT_ORIGIN()
  853. .ta 1.63265i
  854. .in 0i
  855. .sp 2
  856. .ne 20
  857. .ps +3
  858. .vs +3
  859. FT_WHEREIS()    Locate all occurrences of a filespec on a drive
  860. .br
  861. .ta
  862. .in 0.08i
  863. .ps -3
  864. .vs -3
  865. .sp 2
  866. \fBFT_WHEREIS()
  867. Locate all occurrences of a filespec on a drive
  868. .in 0i
  869. .br
  870. \l'6.24i'
  871. .br
  872. .sp
  873. .in 0.08i
  874. \fBSyntax
  875. .sp
  876. .in 0.32i
  877. \fBFT_WHEREIS( [ <cDrive:> ][ <cFilespec> ] ) -> aFiles
  878. .sp
  879. .in 0.08i
  880. \fBArguments
  881. .sp
  882. .in 0.32i
  883. \fB<cDrive:>\fR is an optional drive to search\.  If omitted, FT_WHEREIS()
  884. defaults to the current drive\.
  885. .sp
  886. \fB<cFilespec>\fR is a DOS legal filespec containing the pattern that
  887. you want found\.  The wildcard characters "*" and "?" are supported\.
  888. If no \fB<cFilespec>\fR is specified, FT_WHEREIS() defaults to all files\.
  889. .sp
  890. .in 0.08i
  891. \fBReturns
  892. .sp
  893. .in 0.32i
  894. An array of filenames that match <cFilespec>\.
  895. .sp
  896. .in 0.08i
  897. \fBDescription
  898. .sp
  899. .in 0.32i
  900. Use FT_WHEREIS() to obtain an array with the full path/filenames of all
  901. files on the specified or current drive that match a DOS legal filespec\.
  902. .sp
  903. You may optionally specify a drive to search, other than the current
  904. drive\.  Please note that FT_WHEREIS() will not cause a runtime error if
  905. you specify an invalid or inoperable drive; it instead returns an
  906. empty array\.
  907. .sp
  908. .in 0.08i
  909. \fBExamples
  910. .sp
  911. .in 0.32i
  912. .br
  913. /* Example 1 */
  914. .br
  915. aComSpec := FT_WHEREIS( "command\.com" ) // aComSpec now contains an
  916. .in 3.52i
  917. .br
  918. // entry for every "Command\.com"
  919. .br
  920. // on the current drive
  921. .in 0.32i
  922. .br
  923. /* Example 2 */
  924. .br
  925. aBat := FT_WHEREIS( "a:*\.bat" )
  926. .sp
  927. .br
  928. IF Empty( aBat )
  929. .in 0.56i
  930. .br
  931. ?"Please make sure the proper diskette is in drive A:, and that"
  932. .br
  933. ?"the drive door is closed\."
  934. .in 0.32i
  935. .br
  936. ELSE
  937. .in 0.56i
  938. .br
  939. ? "You have " + Len( aBat ) " batch files on drive A:"
  940. .in 0.32i
  941. .br
  942. ENDIF
  943. .sp
  944. .in 0.08i
  945. \fBSource:\fR WHEREIS\.PRG
  946. .sp
  947. \fBAuthor:\fR Steve Larsen
  948. .in 0i
  949. .sp
  950. .in 1.5i
  951. .ti -1.5i
  952. .ta 1.5i
  953. .ft B
  954. See Also:    
  955. .ft R
  956. FT_TREE()
  957. , FT_ORIGIN()
  958.