File: mark_prt.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 (31 lines) | stat: -rw-r--r-- 750 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
function o=mark_prt(o,prt_number,inout,typ,v)
//mark a port of a block free or used
// o           : block data structure
// prt_number  : port number
// inout       : port orientation ('in' or 'out')
// typ         : port type
//               1  : standard port
//              -1  : event port
// v           : value to assign
//               k>0 : port is connected to link #k
//               0 : port is free

// Copyright INRIA

graphics=o(2),
if inout=='out' then //set an output port
  if typ==1 then  //standard port
    o(2)(6)(prt_number)=v;
else //clock port
  o(2)(8)(prt_number)=v;
  end
else //set an input port
  if typ==1 then  //standard port
    o(2)(5)(prt_number)=v;
  else //clock port
    o(2)(7)(prt_number)=v;
  end
end