/usr/share/gnudatalanguage/lib/last_item.pro is in libgnudatalanguage0 0.9.7-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | ;+
; Project : SOHO - CDS
;
; Name : LAST_ITEM
;
; Purpose : Returns the last element of the input variable.
;
; Explanation : Returns the last element of whatever the input variable is.
;
; Use : IDL> print,last_item(indgen(10))
; ---> 9
;
; Find the latest archive telemetry file:
; IDL> print,last_item(findfile(concat_dir('$CDS_TM_DATA','tm*')))
;
; Inputs : item - variable/array/structure to extract from
;
; Opt. Inputs : None
;
; Outputs : Function returns last value.
;
; Opt. Outputs: None
;
; Keywords : None
;
; Calls : None
;
; Common : None
;
; Restrictions: None
;
; Side effects: None
;
; Category : Util, numerical
;
; Prev. Hist. : None
;
; Written : C D Pike, RAL, 9-Dec-94
;
; Modified :
;
; Version : Version 1, 9-Dec-94
;-
function last_item, item
on_error, 2
; check input
if n_params() lt 1 then begin
message, 'Use: xlast = last_item(x)'
endif
return,item[n_elements(item)-1]
end
|