Project

General

Profile

Bug #65

Dir$ not used when opening files that don't specify a drive/volume.

Added by Brian Flanagan about 4 years ago. Updated about 4 years ago.

Status:
Rejected
Priority:
Normal
Target version:
Start date:
01/22/2020
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

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"

Result:

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"
#1

Updated by Baptiste Pillot about 4 years ago

  • Assignee set to Francois Lionet
#2

Updated by Francois Lionet about 4 years ago

  • Status changed from New to Resolved
  • Target version set to 0.9.3.2

Corrected! Actually I was not taking at all the current path into account, so it has corrected the whole filesystem.

#3

Updated by Baptiste Pillot about 4 years ago

  • Description updated (diff)
#4

Updated by Brian Flanagan about 4 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.

#5

Updated by Francois Lionet about 4 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.

Also available in: Atom PDF