File: get_block_info.sci

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (68 lines) | stat: -rw-r--r-- 1,837 bytes parent folder | download
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
function txt=get_block_info(scs_m,k)
// Copyright INRIA
txt=[]
o=scs_m(k)
select o(1)
case 'Block' then
  txt = standard_document(o,k)
  txt=[txt;' ']
  
  if o(3)(1)=='super'|o(3)(1)=='csuper' then
    objet=o(3)(8)
    infos = objet(1)
    if size(infos(2),'*')==2 then 
      txt = [txt;'Super Block Documentation: '+infos(2)(2)+'/'+infos(2)(1)]
    else
      txt = [txt;'Super Block Documentation: '+infos(2)(1)]
    end
    if size(infos)>=10 then 
      txt=[txt;get_info(infos(10))],
    end
    // information on components
    boutons = ['Yes', 'No']
    ligne_1 = list('Blocks', 2, boutons)
    ligne_2 = list('Links', 2, boutons)
    ligne_3 = list('Nodes', 2, boutons)
    ligne_4 = list('Others', 2, boutons)
    ligne_5 = list('Super Blocks', 2, boutons)
    //
    titre = ['This is a super block, Select additional '
	'informations you want to get on it''s'
	'components']
    reponse = x_choices(titre, list(ligne_1, ligne_2, ligne_3, ligne_4, ligne_5))
    if reponse <>[] then
      filtre = (reponse == 1)
      if or(filtre) then
	txt=[txt;
	    'Informations on selected components'
	    '----------------------------------';' ']
      end
      for k = 2 : size(objet)
	o1=objet(k)
	ok=%f
	if o1(1)=='Block' then
	  ok=filtre(1)|..
	     filtre(5)&(o1(3)(1)=='super'|o1(3)(1)=='csuper')|..
	     filtre(4)&is_split(o1)
	else  
	  ok=((o1(1)=='Link')&filtre(2))|((o1(1)=='Text')&filtre(4))
	end
	if ok then
	  txt=[txt;indent(get_block_info(objet,k))]
	end
      end
    end
  else
    execstr('texte_2 = '+o(5)+'(''show'', o)')
    if texte_2==[] then
      texte_2='No  documentation available for the parameters of this block'
    end
    txt=[txt;'Block Parameters';texte_2]
  end
case 'Link' then
  txt = standard_document(o,k)
case 'Text' then
  txt = standard_document(o,k)
case 'Deleted' then
  txt=[]
end