comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » DEFSYSV with /TEST option?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
DEFSYSV with /TEST option? [message #94678] Tue, 15 August 2017 10:27 Go to next message
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
The /TEST keyword to DEFSYSV allows you to set default values for system variables; that is, if the value is not already set by an upstream process, DEFSYSV will set it. This is what the documentation says:
https://harrisgeospatial.com/docs/DEFSYSV.html
"TEST: Set this keyword to create a new system variable only if one does not currently exist."

But when we try to do this:

IDL> defsysv,'!VAR',0,/test
% Keyword TEST not allowed in call to: DEFSYSV

IOID (Implemented Only In Documentation)?

--Edward H.
Re: DEFSYSV with /TEST option? [message #94679 is a reply to message #94678] Tue, 15 August 2017 10:57 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
What version of IDL are you running? Your example works correctly for me in IDL 8.5.1 in both Linux and MacOS.

On Tuesday, August 15, 2017 at 1:27:20 PM UTC-4, Edward Hyer wrote:
> The /TEST keyword to DEFSYSV allows you to set default values for system variables; that is, if the value is not already set by an upstream process, DEFSYSV will set it. This is what the documentation says:
> https://harrisgeospatial.com/docs/DEFSYSV.html
> "TEST: Set this keyword to create a new system variable only if one does not currently exist."
>
> But when we try to do this:
>
> IDL> defsysv,'!VAR',0,/test
> % Keyword TEST not allowed in call to: DEFSYSV
>
> IOID (Implemented Only In Documentation)?
>
> --Edward H.
Re: DEFSYSV with /TEST option? [message #94681 is a reply to message #94679] Thu, 17 August 2017 10:40 Go to previous messageGo to next message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
… and correctly for me in IDL 8.5.1 on Windows.

Cheers,
-Dick

Dick Jackson Software Consulting Inc.
Victoria, BC, Canada --- http://www.d-jackson.com

On Tuesday, 15 August 2017 10:57:30 UTC-7, wlandsman wrote:
> What version of IDL are you running? Your example works correctly for me in IDL 8.5.1 in both Linux and MacOS.
>
> On Tuesday, August 15, 2017 at 1:27:20 PM UTC-4, Edward Hyer wrote:
>> The /TEST keyword to DEFSYSV allows you to set default values for system variables; that is, if the value is not already set by an upstream process, DEFSYSV will set it. This is what the documentation says:
>> https://harrisgeospatial.com/docs/DEFSYSV.html
>> "TEST: Set this keyword to create a new system variable only if one does not currently exist."
>>
>> But when we try to do this:
>>
>> IDL> defsysv,'!VAR',0,/test
>> % Keyword TEST not allowed in call to: DEFSYSV
>>
>> IOID (Implemented Only In Documentation)?
>>
>> --Edward H.
Re: DEFSYSV with /TEST option? [message #94682 is a reply to message #94681] Thu, 17 August 2017 16:03 Go to previous messageGo to next message
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
On Thursday, August 17, 2017 at 10:40:38 AM UTC-7, Dick Jackson wrote:
> … and correctly for me in IDL 8.5.1 on Windows.
>
> Cheers,
> -Dick
>
> Dick Jackson Software Consulting Inc.
> Victoria, BC, Canada --- http://www.d-jackson.com
>
> On Tuesday, 15 August 2017 10:57:30 UTC-7, wlandsman wrote:
>> What version of IDL are you running? Your example works correctly for me in IDL 8.5.1 in both Linux and MacOS.
>>
>> On Tuesday, August 15, 2017 at 1:27:20 PM UTC-4, Edward Hyer wrote:
>>> The /TEST keyword to DEFSYSV allows you to set default values for system variables; that is, if the value is not already set by an upstream process, DEFSYSV will set it. This is what the documentation says:
>>> https://harrisgeospatial.com/docs/DEFSYSV.html
>>> "TEST: Set this keyword to create a new system variable only if one does not currently exist."
>>>
>>> But when we try to do this:
>>>
>>> IDL> defsysv,'!VAR',0,/test
>>> % Keyword TEST not allowed in call to: DEFSYSV
>>>
>>> IOID (Implemented Only In Documentation)?
>>>
>>> --Edward H.

8.2.3 on Linux, does not work. Doesn't really matter, it's a two-line workaround using the EXISTS= keyword, but the documentation doesn't indicate this feature is new.
Re: DEFSYSV with /TEST option? [message #94689 is a reply to message #94682] Mon, 21 August 2017 09:45 Go to previous message
Louis Giglio is currently offline  Louis Giglio
Messages: 2
Registered: February 2013
Junior Member
Hi Ed!

Seems to have been added in IDL 8.5 (or perhaps 8.4.x):

IDL> print, !version
{ x86_64 linux unix linux 8.4 Sep 27 2014 64 64}
IDL> defsysv,'!VAR',0,/test
% Keyword TEST not allowed in call to: DEFSYSV
% Execution halted at: $MAIN$

IDL> print, !version
{ x86_64 linux unix linux 8.5 Jul 7 2015 64 64}
IDL> defsysv,'!VAR',0,/test
IDL> print, !var
0

Cheers,
Louis
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL (8.6.0) Help not working after update to MacOS Sierra 10.12.5
Next Topic: IDL background job quits without error message

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 07:16:55 PDT 2025

Total time taken to generate the page: 0.00503 seconds