.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "IDL 3pm" .TH IDL 3pm "2023-06-17" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" PDL::IO::IDL \-\- I/O of IDL Save Files .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\s-1PDL::IO::IDL\s0 allows you to read and write \s-1IDL\s0(tm) data files. .PP Currently, only reading is implemented. Scalars, arrays, and structures are all supported. Heap pointers, compiled code, and objects are not supported. Of those three, only heap pointers are likely to be supported in the future. .PP This code was not developed by \s-1RSI,\s0 makers of \s-1IDL.\s0 .SH "NOTES" .IX Header "NOTES" These things seem to work: .IP "\s-1BYTE, SHORT, LONG, FLOAT,\s0 and \s-1DOUBLE\s0 numeric types and arrays" 3 .IX Item "BYTE, SHORT, LONG, FLOAT, and DOUBLE numeric types and arrays" All of these types seem to work fine. The corresponding variable is stored as a \s-1PDL\s0 in the hash element with the same name as the original variable in the file. Arrays are byteswapped as needed and are read in so that the dim list has the same indexing order within \s-1PDL\s0 as it did within \s-1IDL.\s0 .IP "STRINGs and arrays of STRINGs" 3 .IX Item "STRINGs and arrays of STRINGs" String types are stored as Perl list refs, in the hash element with the same name as the original variable in the file. .IP "Structures" 3 .IX Item "Structures" Structures are stored as hash refs. The elements of the hash may be accessed as values within the hash. .IP "Common blocks" 3 .IX Item "Common blocks" Variables that are notated as being in a common block are read as normal. Common-block names are collected in the special hash value \&'+common', which contains a hash each keyword of which is the name of a common block and each value of which is an array of variable names. .PP These things are known to be not working and may one day be fixed: .IP "\s-1COMPLEX\s0 numbers" 3 .IX Item "COMPLEX numbers" These could be implemented as 2\-arrays or as PDL::Complex values, but aren't yet. .IP "\s-1PTR\s0 types" 3 .IX Item "PTR types" These could be implemented as perl refs but currently aren't. .IP "writing" 3 .IX Item "writing" Maybe one day \*(-- but why bother writing a broken file format? NetCDF is better. .PP These things are known to be not working and will probably never be fixed .IP "Compiled code" 3 .IX Item "Compiled code" Decompiling \s-1IDL\s0 code is a violation of the \s-1IDL\s0 end-user license. To implement this, someone who does not hold an \s-1IDL\s0 license would have to reverse-engineer a set of .SAV files sent to that person by someone else with an \s-1IDL\s0 license. .IP "Objects" 3 .IX Item "Objects" \&\s-1IDL\s0 objects contain compiled code. .SH "FUNCTIONS" .IX Header "FUNCTIONS" .SS "ridl" .IX Subsection "ridl" \&\f(CW$x\fR = ridl(\*(L"foo.sav\*(R"); .PP Read an \s-1IDL\s0 save file from a file. .PP Upon successful completion, \f(CW$x\fR is a hash ref containing all of the variables that are present in the save file, indexed by original variable name. .PP \&\s-1IDL\s0 identifiers are case insensitive; they're all converted to upper-case in the hash that gets returned. This may be adjustable at a future date. Furthermore, because \s-1IDL\s0 identifiers can't contain special characters, some fields that start with '+' are used to store metadata about the file itself. .PP Numeric arrays are stored as PDLs, structures are stored as hashes, and string and structure arrays are stored as perl lists. Named structure types don't exist in perl in the same way that they do in \&\s-1IDL,\s0 so named structures are described in the 'structs' field of the global metadata. Anonymous structures are treated as simple hashes. Named structures are also simple hashes, but they also contain a field \&'+name' that refers to the name of the structure type. .SH "AUTHOR, LICENSE, NO WARRANTY" .IX Header "AUTHOR, LICENSE, NO WARRANTY" \&\s-1THIS CODE IS PROVIDED WITH NO WARRANTY\s0 and may be distributed and/or modified under the same terms as \s-1PDL\s0 itself. .PP This code is based on the analysis of the \s-1IDL\s0 save file format published by Craig Markwardt in 2002. .PP \&\s-1IDL\s0 is a trademark of Research Systems Incorporated (\s-1RSI\s0). The \s-1PDL\s0 development team, and authors of this code, are not affiliated with \s-1RSI.\s0