X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 27 Oct 2015 09:21 AM by  Zachary Norman
.sav file problem
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Zachary Norman



Basic Member


Posts:173
Basic Member


--
27 Oct 2015 09:21 AM
    <p>My colleagues and I have been trying to open a .sav file, but get an error from IDL that says &ldquo;Keyword TRUE not allowed in call to: DEVICE&rdquo;. I&rsquo;m using IDL 8.5 on a Windows machine. My colleague is using it on Linux, and it works fine for him. Any suggestions? We&rsquo;re stumped.</p>

    Zachary Norman



    Basic Member


    Posts:173
    Basic Member


    --
    27 Oct 2015 09:30 AM
    <p>Hi,</p> <p><br /> </p> <p>Taking a look at the documentation for DEVICE there is a keyword TRUE_COLOR (<a href="http://www.exelisvis.com/docs/DEVICE_Procedure.html#devices_517620971_883042">http://www.exelisvis.com/docs/DEVICE_...</a>). I think that the error you are seeing which says keyword TRUE is not allowed in call to device is for the keyword TRUE_COLOR. This is because IDL will automatically fill in the rest of the keyword if there is only one possibility which means that for Linux TRUE translates to TRUE_COLOR, but not on Windows. The difference is because the keyword for TRUE_COLOR is only allowed for the following devices:&nbsp;METAFILE, PRINTER, X. To see which devices the keywords are allowed for, you can look at the text in parenthesis directly below the keyword itself.</p> <p>Because IDL on Linux uses the X windows display for direct graphics, whereas Windows does not, then you won't be allowed to use that keyword. Your best bet would be to create some separate portions of code for Windows or for Linux. To do this, you can use the !VERSION system variable like this:</p> <p><strong>if (!VERSION.OS_FAMILY eq 'unix') then begin<br /> &nbsp; &nbsp; &nbsp;;call to device containing linux keywords<br /> endif else begin<br /> &nbsp; &nbsp; &nbsp;;call to device for windows keywords<br /> endelse</strong></p> <p>Alternatively, you could also use newer function graphics which look a lot better and you may avoid some Linux only keywords.</p> <p>Hope this helps!</p> <p>-Zach (VIS)&nbsp;</p>
    You are not authorized to post a reply.