[go: up one dir, main page]

Menu

[r377]: / idl_lib / typecode.pro  Maximize  Restore  History

Download this file

27 lines (25 with data), 644 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
;converts a string type to a type code:
function typecode, string
string=strlowcase(string)
case string of
"byte": return, 1
"integer": return, 2
"int": return, 2
"signed int": return, 2
"signed integer": return, 2
"long": return, 3
"long int": return, 3
"long integer": return, 3
"float": return, 4
"real": return, 4
"double": return, 5
"complex": return, 6
"string": return, 7
"unsigned int": return, 12
"unsigned integer": return, 12
"unsigned long": return, 13
"unsigned long int": return, 13
"unsigned long integer": return, 13
else: return, 0
endcase
end