We compiled the most recent version of GDL on our Ubuntu 16.04 machine.
The scripts I got from my colleague work just fine, and they use various GDL functions.
The strange thing is that I can not execute any function on the prompt without getting an error message. However, if I assign the output of a function to a variable, the function is obviously executed properly.
gdl
GDL - GNU Data Language, Version 0.9.6
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
I have absolutly no idea if it would be difficult to add it in GDL now.
I do not see that as an urgent point, I do not remember we had request for that up to now.
Alain
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Wow - thanks a lot. So this is normal in GDL. I tested a test version of IDL and there it works fine. So no problem with my GDL installation, but kind of strange in general that this his not implemented. Many thanks for the clarification!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is in fact implemented in GDL, with a special compilation. I'm not sure that AUTO_PRINT_EXPR
appears in the standard make - if not then add the line directly to config.h. Otherwise, add the following after the cmake command:
We compiled the most recent version of GDL on our Ubuntu 16.04 machine.
The scripts I got from my colleague work just fine, and they use various GDL functions.
The strange thing is that I can not execute any function on the prompt without getting an error message. However, if I assign the output of a function to a variable, the function is obviously executed properly.
gdl
GDL - GNU Data Language, Version 0.9.6
+/usr/local/share/gnudatalanguage/lib
http://sourceforge.net/projects/gnudatalanguage/
GDL> help
% At $MAIN$
Compiled Procedures:
$MAIN$
Compiled Functions:
GDL> primes(10)
% Lexer/Parser syntax error: expecting DOT, found '
'
GDL> help
% At $MAIN$
Compiled Procedures:
$MAIN$
Compiled Functions:
GDL> a=primes(10)
% Compiled module: PRIMES.
GDL> help
% At $MAIN$
A LONG = Array[10]
PRIMES UNDEFINED = <Undefined>
Compiled Procedures:
$MAIN$
Compiled Functions:
PRIMES
GDL> print, a
2 3 5 7 11 13 17 19 23 29
GDL> print, primes(10)
2 3 5 7 11 13 17 19 23 29
GDL> print, !PATH
/usr/local/share/gnudatalanguage/lib/dicom:/usr/local/share/gnudatalanguage/lib/envi:/usr/local/share/gnudatalanguage/lib:/home/myname/mymodel/:/home/myname/mymodel/xyzvlib/
GDL>
As you can see,
primes(10)
produces an error, but
a=primes(10)
or
print, primes(10)
does not. Also, why does PRIMES UNDEFINED = <Undefined> appear?
As you can see, the PATH seems to be setup correctly (note that I changed my user name and the path to my model for privacy reasons).
What is causing these lexer/parser errors? How can I prevent them?
"implied print" is currently not implemented in GDL
http://www.harrisgeospatial.com/docs/impliedprint.html
this functionnality appears in IDL 8.3
http://www.harrisgeospatial.com/Home/NewsUpdates/TabId/170/ArtMID/735/ArticleID/13771/Implied-Print-New-Command-Line-Feature-in-IDL-83.aspx
I have absolutly no idea if it would be difficult to add it in GDL now.
I do not see that as an urgent point, I do not remember we had request for that up to now.
Alain
Wow - thanks a lot. So this is normal in GDL. I tested a test version of IDL and there it works fine. So no problem with my GDL installation, but kind of strange in general that this his not implemented. Many thanks for the clarification!
This is in fact implemented in GDL, with a special compilation. I'm not sure that AUTO_PRINT_EXPR
appears in the standard make - if not then add the line directly to config.h. Otherwise, add the following after the cmake command:
~~
sed -e 's;/* #undef AUTO_PRINT_EXPR */;#define AUTO_PRINT_EXPR 1;' -i config.h
~~
Enabling AUTO_PRINT_EXPR is far from mimicking the "implied print" feature of recent IDLs.