File: help_skeleton.sci

package info (click to toggle)
scilab 4.0-12
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 100,640 kB
  • ctags: 57,333
  • sloc: ansic: 377,889; fortran: 242,862; xml: 179,819; tcl: 42,062; sh: 10,593; ml: 9,441; makefile: 4,377; cpp: 1,354; java: 621; csh: 260; yacc: 247; perl: 130; lex: 126; asm: 72; lisp: 30
file content (104 lines) | stat: -rw-r--r-- 2,790 bytes parent folder | download | duplicates (2)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
function txt=help_skeleton(funname,path)
global LANGUAGE
if type(funname)<>10 then error('argument should be a function name'),end
txt=[]
vars=macrovar(evstr(funname))
inputs=vars(1)
outputs=vars(2)
context=vars(3)
Call=''
if size(outputs,'*')==1 then
  Call=outputs+' = '
elseif size(outputs,'*')>1 then
  Call='['+strcat(outputs,',')+'] = '
end
Call=Call+funname
if size(inputs,'*')>=1 then
  Call=Call+'('+strcat(inputs,',')+')'
end
args=[inputs(:);outputs(:)]

txt=[
'<?xml version=""1.0"" encoding=""ISO-8859-1"" standalone=""no""?>' 
'<!DOCTYPE MAN SYSTEM ""file://'+pathconvert(SCI,%t,%t)+'man/manrev.dtd"">'
'<MAN>'
'  <LANGUAGE>eng</LANGUAGE>'
'  <TITLE>'+funname+'</TITLE>'
'  <TYPE>Scilab Function  </TYPE>'
'  <DATE>'+date()+'</DATE>'
'  <SHORT_DESCRIPTION name=""'+funname+'"">  add short decription here</SHORT_DESCRIPTION>'
''
'  <CALLING_SEQUENCE>'
'  <CALLING_SEQUENCE_ITEM>'+Call+'</CALLING_SEQUENCE_ITEM>'
'  </CALLING_SEQUENCE>'
'']
if size(args,'*') >0 then
txt=[txt;
'  <PARAM>'
'  <PARAM_INDENT>']
for a=args'
txt=[txt;"";
'    <PARAM_ITEM>'
'    <PARAM_NAME>'+a+'</PARAM_NAME>'
'    <PARAM_DESCRIPTION>'
'       <SP>'     
'       : add here the parameter description'
'       </SP>'         
'    </PARAM_DESCRIPTION>'
'    </PARAM_ITEM>']
end
txt=[txt;
'  </PARAM_INDENT>'
'  </PARAM>'
' ']
end
txt=[txt;
     '  <DESCRIPTION>'
     '     <DESCRIPTION_INDENT>'     
     '     <DESCRIPTION_ITEM>'     
     '     <P>'     
     '      Add here a paragraph of the function description. '
     '      Other paragraph can be added '
     '     </P>'   
     '     </DESCRIPTION_ITEM>' 
     '     <DESCRIPTION_ITEM>'     
     '     <P>'     
     '      Add here a paragraph of the function description '
     '     </P>'   
     '     </DESCRIPTION_ITEM>' 
     '     </DESCRIPTION_INDENT>'       
     '  </DESCRIPTION>'
     ''
     '  <EXAMPLE><![CDATA['
     '   Add here scilab instructions and comments'
     '  ]]></EXAMPLE>'
     ''
     '  <SEE_ALSO>'
     '    <SEE_ALSO_ITEM> <LINK> add a key here</LINK> </SEE_ALSO_ITEM>'
     '    <SEE_ALSO_ITEM> <LINK> add a key here</LINK> </SEE_ALSO_ITEM>'
     '  </SEE_ALSO>'
     ''
    '  <AUTHORS>'
     '    <AUTHORS_ITEM label=''enter here the author name''>'      
     '    Add here the author  references'
     '    </AUTHORS_ITEM>'
     '  </AUTHORS>'
     ''
     '  <BIBLIO>'
     '    <SP>'  
     '    Add here the function bibliography if any'
     '    </SP>'  
     '  </BIBLIO>'
     ''
     '  <USED_FUNCTIONS>'
     '     <SP>'  
     '     Add here the used function name and  references'
     '     </SP>'  
     '  </USED_FUNCTIONS>'     
     '</MAN>'
    ]
if argn(2)==2 then
  mputl(txt,pathconvert(path,%t,%f)+funname+'.xml')
  txt=pathconvert(path,%t,%f)+funname+'.xml'
end
endfunction