Closed isaacdl closed 2 years ago
Since your code is neither a procedure or a function, it is nos surprising, from my point of view. If you add "pro hello" at the beginning of the code, I think it will go better.
(Do you speak on IDL/GDL MIRIM code https://arxiv.org/pdf/1810.00894.pdf or on python MIRISIM https://arxiv.org/abs/2010.15710 ? :smile:)
Thanks for providing the feedback!
When I enter gdl and I try to run hello I get this error:
Does IDL behave differently here?
I tested in detail if IDL & (current) GDL are giving same results. Yes !
Three remarks after some tests :
HTH
In addition to what is said above you can put in a file named hello
:
print, 'Hello world'
mirim_init
.r mirim_compute_psf
mirim_psf, './configuration/test_psfs.cfg'
exit
and then either
$ gdl
GDL - GNU Data Language, Version 1.0.1 Git
- For basic information type HELP,/INFO
- Default library routine search path used (GDL_PATH/IDL_PATH env. var. not set): /usr/local/share/gnudatalanguage/lib
- Using WxWidgets as graphics library (windows and widgets).
- Please report bugs, feature or help requests and patches at: https://github.com/gnudatalanguage/gdl
% PREF_SET: Unknown preference: IDL_RBUF_SIZE
% PREF_SET: Unknown preference: IDL_MORE
GDL> @hello
Hello world
(..etc...)
(notice the @
)
or gdl -e "@hello"
or convert hello in hello.pro and add pro hello
as first line, making it a procedure, which can be called as
gdl -e "hello"
But of course whatever the way to invoke 'hello', insure the !PATH contains all locations for all procedures needed.
If this is the MIRI package I would expect there exist some general setup procedure that defines everything useful once and for all...
Still, the error message seems puzling, right?:
At: /home/isaac/hello.pro, Line 2 Column 11
This is because GDL poorly succeeds to mimic IDL's implied_print new behaviour, by calling 'print,/implied_print' whatever is not a known procedure, etc. In this case, "hello" that was... nothing due to parsing errors.
Thanks, Gilles. Do we have it described in an issue (cannot find, I guess a good idea to note down)?
Hi, thanks for the fast help, was away from laptop. I have tested:
1) add the + before the path. If I type print, !PATH I get this response:
GDL> print, !PATH /home/isaac/blabla:/usr/share/gnudatalanguage/lib/envi:/usr/share/gnudatalanguage/lib/dicom:/usr/share/gnudatalanguage/lib/obsolete:/usr/share/gnudatalanguage/lib Which, from my experience, its correct.
2) I also have tried to add the pro blabla and the end. It's still not working.
3) Yes, added the @ and It worked like a charm. Now I have a problem with astrolib but not gdl stuff, I think I can fix this by myself. Thanks for the help.
Have a good night u all!
I also have tried to add the pro blabla and the end. It's still not working.
pro
needs to be at the beginning of the file, like:
pro test
print, "test"
end
the file needs to be named test.pro
if the procedure is named test
Thanks everybody for the warm help. Merry Christmas!
Hi, first of all, sorry for my ignorance. I was requested to install gdl for some work. I installed gdl from bash with sudo apt-get install gnudatalanguage. My simple code is in /home/isaac/blabla
The code is the following one:
Before trying to run this code I added a new GDL path:
export GDL_PATH="/home/isaac/blabla":
gdl -quiet -e 'print, !PATH'``When I enter gdl and I try to run hello I get this error:
Please, any help would be appreciated. Have a good day fellas.