Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown command: run #1914

Open
mzechmeister opened this issue Nov 21, 2024 · 4 comments
Open

Unknown command: run #1914

mzechmeister opened this issue Nov 21, 2024 · 4 comments
Labels

Comments

@mzechmeister
Copy link

It seems the .run command is not fully implemented. Here an example with .r, which should be an abbreviation of .run or (.rnew?)

IDL> .r
- i=1
- end
% Compiled module: $MAIN$.

vs.

GDL> .r
i=1
end
% Unknown command: r
i=1
end

The run command is handy to copy&paste larger and nested code snippets into the command line.
With the option -t the source code can be inspected.

I noted that compiling with .r function.pro works at least locally; but not when an absolute path is given, like .r /home/gdl/function.pro yielding % Error opening file. File: /home/gdl/function.pro).

@jtappin
Copy link

jtappin commented Nov 21, 2024

This looks to be largely the same issue as #1868.

@GillesDuvert
Copy link
Contributor

Dears, .RUN ( opposed to .RUN _something_ ) has never been implemented in GDL.

@mzechmeister
Copy link
Author

@GillesDuvert Are there plans to implement .run?
You can consider this as a feature request.
With _something_ you probably mean the filename of a script. As said it does not work for absolute pathnames.

@GillesDuvert
Copy link
Contributor

@mzechmeister indeed, having .r (.run) compile "on the spot" needs a subtle use of the line editor and the ANTLR compiler, not really tricky but clearly not a simple patch.

but, for me .r works with absolute pathnames:

GDL> .r /home/gildas/test1.pro 
% Compiled module: TEST1.

Except that... typing 'TEST1' in the above example suffices in most cases if test1.pro is in the !PATH.

Or, did I miss something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants