dbtitle.pro

来自「basic median filter simulation」· PRO 代码 · 共 39 行

PRO
39
字号
function dbtitle,c,f;+; NAME:;	DBTITLE; PURPOSE:;	function to create title line for routine dbprint;; CALLING SEQUENCE:;	result = dbtitle( c, f );; INPUTS:;	c = string array of titles for each item;	f = field length of each item;; OUTPUT:;	header string returned as function value;; OPERATIONAL NOTES:;	this is a subroutine of DBPRINT.;; HISTORY:;	version 1  D. Lindler  Sept 86;	Converted to IDL V5.0   W. Landsman   September 1997;-;------------------------------------------------------------n=n_elements(c)h=' 'com = strtrim(c,0)              ;header for item with trailing blanks removedncom = strlen(com)for i=0,n-1 do begin		;loop on items	flen=f[i]		;field length	st=string(replicate(byte(32),flen+1));blank field	ipos=((flen-ncom[i]+1)/2)>1	;starting position in field for comment	strput,st,com[i],ipos	;insert into field	h=h+st			;add to headerend; loop on itemsreturn,h			;return headerend

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?