LCSims
13-03-2012, 04:48
Continuing my discovery of programming in the 21st Century style, I was moving a small program from another form of BASIC into thinBASIC. It gathers a directory listing of files and one of the areas I wanted to add to the program was testing file names and their length. Since the file naming must be pretty uniform, I am looking for a slightly longer file name and marking an output file when encountered. As an avid reader of the help file, I came across the File Equates that are available. Of interest were the "%Path_File" and "%Path_Ext", but there was no further guidance in the help as to how they are used, nor could I find anything in checking some of the sample scripts.
So if I may ask, does anyone have a line or two of how these are coded? My attempts at using them like this were not successful; variable1 = %Path_File (variable2). Variable2 is a read of the full system path and file name. Both variables were setup as String.
Thank you for any insight, as it will help in future coding. For now I've just used an old fashioned "brute force" methodology, which means more more work in most cases.
Lance
So if I may ask, does anyone have a line or two of how these are coded? My attempts at using them like this were not successful; variable1 = %Path_File (variable2). Variable2 is a read of the full system path and file name. Both variables were setup as String.
Thank you for any insight, as it will help in future coding. For now I've just used an old fashioned "brute force" methodology, which means more more work in most cases.
Lance