📄 dbtitle.pro
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -