![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

Y have devoleped with TF83 runing under DOS the fonction FILEXIST
Y would have it for running with SwiftForth.
Can you help my please for create an fonction to find an file in an=
directory
My old Fonction
: FILE%EXIST ( adr, len --- fl ) \ Teste si un fichier existe. Le nom dos
\ du fichier est point=E9 par adr et len.
\ Le nom du fichier peut contenir des jokers. =
=1F
128 SET-DMA \ Valeur habituelle DTA dans PSP
dma 30 + 12 blank
OVER 1+ C@ ASCII : =3D
IF
OVER C@ UPC ASCII A - SELECT
THEN
PAD PLACE 0 PAD COUNT + C!
PAD 1+ 18 (SEARCH0)
;
The new fonction in SwiftForth
: FILE%EXIST ( addr,len --- flag ) \ Return an true flag if the file pointed
\ with addr,len exist. If the file not exist then flag is false
????????????????
????????????????
????????????????
;
For Exemple, y will writen in my programm
S" C:\TFXDEV\WIN\Commandes Grafcet.Gft" FILE%EXIST
If the file C:\TFXDEV\WIN\Commandes Grafcet.Gft exist=20
Then Fonction FILE%EXIST will return TRUE
If the file not exist then FILE%EXIST will return FALSE
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives! Visit http://www.forth.com/search for details.
Received on Tue Dec 04 2001 - 02:28:28 PST
This archive was generated by hypermail 2.2.0 : Sat Nov 22 2008 - 03:04:20 PST