Dir$ not used when opening files that don't specify a drive/volume.
Example: Help_69, line 134 from AMOSPro_Examples disk.
This example will fail even though the file is in the proper directory structure, and Dir$ is set properly.
Dir$="AMOSPro_Examples:Examples/H-6/" Open In 1,"jokes"
File not found at line: 134, column: 1.
Manually entering the full path into the Open command works.
Open In 1,"AMOSPro_Examples:Examples/H-6/jokes"
Updated by Brian Flanagan over 2 years ago
- Status changed from Resolved to Feedback
- Affected version changed from 0.9.3 to 0.9.5
Checked in version 0.9.5.1.
Still fails. Drive not found error occurred when setting Dir$, when using the "default resources".
Works when the application's local filesystem is used. Perhaps Dir$ has not been checked properly?
Also works when the full path is directly coded in the Open statement.
Updated by Francois Lionet over 2 years ago
- Status changed from Feedback to Rejected
The principle of the default drive is that when transpiling, I include the file if the path to the file WITHIN the instruction is a CONSTANT. Here, Open In does not work on a constant, but on a reserved variable, Dir$.
What you ask, detecting that Dir$ actually contains a fixed path would imply a specific evaluation of the values affected to Dir$ etc. A lot of work for not much. Code should remain code, I cannot pseudo-evaluate while transpiling.