function datatype, value ;+ ; function returns the datatype of value ; ; LICENSE ; ; This software is OSI Certified Open Source Software. ; OSI Certified is a certification mark of the Open Source Initiative. ; ; Copyright © 1997-2001 Kling Research and Software. ; ; This software is provided "as-is", without any express or ; implied warranty. In no event will the authors be held liable ; for any damages arising from the use of this software. ; ; Permission is granted to anyone to use this software for any ; purpose, including commercial applications, and to alter it and ; redistribute it freely, subject to the following restrictions: ; ; 1. The origin of this software must not be misrepresented; you must ; not claim you wrote the original software. If you use this software ; in a product, an acknowledgment in the product documentation ; would be appreciated, but is not required. ; ; 2. Altered source versions must be plainly marked as such, and must ; not be misrepresented as being the original software. ; ; 3. This notice may not be removed or altered from any source distribution. ; ; For more information on Open Source Software, visit the Open Source ; web site: http://www.opensource.org. ;- array = size(value) type = array(n_elements(array)-2) case type of 0: type = 'undefined' 1: type = 'byte' 2: type = 'integer' 3: type = 'long' 4: type = 'float' 5: type = 'double' 6: type = 'complex' 7: type = 'string' 8: type = 'structure' 9: type = 'DoubleComplex' 10: type = 'pointer' 11: type = 'object' 12: type = 'unsigned integer' 13: type = 'unsigned longword integer' 14: type = '64-bit integer' 15: type = 'unsigned 64-bit integer' endcase return,type end