I'd like to open a file and then display the name of the file that I just opened. Tried the following but get a syntax Error.The file name in your example is "wfile", not &Fnew.
FILE Fnew : Text;
FILE_OPEN(Fnew, "wfile", WRITE_MODE);
report "FILE NAME = ", & Fnew; --Syntax Error
Thanks for your help.
On Thursday, February 10, 2022 at 1:10:50 PM UTC-5, ashokm...@gmail.com wrote:
I'd like to open a file and then display the name of the file that I just opened. Tried the following but get a syntax Error.
FILE Fnew : Text;
FILE_OPEN(Fnew, "wfile", WRITE_MODE);
report "FILE NAME = ", & Fnew; --Syntax Error
Thanks for your help.The file name in your example is "wfile", not &Fnew.
So it should be
report "FILE NAME = " & "wfile";
Alternatively, define a string constant and pass that string to the file_open procedure as well as using it in the report statement.
On Friday, February 11, 2022 at 3:33:30 AM UTC-8, KJ wrote:
On Thursday, February 10, 2022 at 1:10:50 PM UTC-5, ashokm...@gmail.com wrote:
I'd like to open a file and then display the name of the file that I just opened. Tried the following but get a syntax Error.
FILE Fnew : Text;
FILE_OPEN(Fnew, "wfile", WRITE_MODE);
report "FILE NAME = ", & Fnew; --Syntax Error
Thanks for your help.The file name in your example is "wfile", not &Fnew.
So it should be
report "FILE NAME = " & "wfile";
Alternatively, define a string constant and pass that string to the file_open procedure as well as using it in the report statement.Thanks but I still get a syntax error with your solution. Also, defined a string constant and passed that to the file_open and report statements. Still syntax Error.
On Friday, February 11, 2022 at 3:33:30 AM UTC-8, KJ wrote:[...]
On Thursday, February 10, 2022 at 1:10:50 PM UTC-5, ashokm...@gmail.com wrote:
I'd like to open a file and then display the name of the file that I just opened. Tried the following but get a syntax Error.
FILE Fnew : Text;
FILE_OPEN(Fnew, "wfile", WRITE_MODE);
report "FILE NAME = ", & Fnew; --Syntax Error
[...]> Thanks but I still get a syntax error with your solution. Also,The file name in your example is "wfile", not &Fnew.
So it should be
report "FILE NAME = " & "wfile";
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 68:48:39 |
Calls: | 6,712 |
Files: | 12,244 |
Messages: | 5,356,560 |