谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
! F; e- x7 J$ n6 e) n0 b7 Obegin model initialization function
+ @- w9 ~ E5 k" J/ u, H# | create 1 load of load type L_null to P_Creation2
% |0 L" G, S. A2 I# C, W create 1 load of load type L_null to P_Creation3
0 U' Z4 [+ U v) r2 E( J! q" { create 1 load of load type L_null to P_Creation4
; J8 R/ c- }8 |' }4 w1 z return true
5 P: q3 G& }8 }8 I8 ~% bend' @- ^8 H4 E3 R) T) r
+ `0 G* g/ F2 U& \& B: J
begin P_Creation2 arriving procedure
# {* L9 J9 y2 M- }while 1=1 do; [' o$ e& _# ~% {/ Y
begin
9 T! x6 f& {+ e wait for 1 sec" Q. b% V/ d: `, T8 J4 L5 {4 N- W0 P
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
/ l0 o& D" ^7 o2 c$ [ end
& {2 @9 T3 h3 a7 `) kend
; D, l! D4 R6 h# \
2 p; @4 c7 V4 @. s. e$ Rbegin P_Creation3 arriving procedure
( S, p2 [; B+ I- h. Swhile 1=1 do8 `" m# M+ c8 K
begin+ `5 U7 L4 _; t0 X- v
wait for 1 sec @2 ^9 X3 Q8 w7 g9 U1 I+ c1 a
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
& g2 T$ f3 G. l; p* x; ^ end T4 M k9 }4 J8 q1 ~
end @% E x' L" j% A3 Q+ p
2 W5 K, u! ]. g# a5 O! {# W8 R( ?begin P_Creation4 arriving procedure* X, i0 G4 P. j2 D: j
while 1=1 do. G& R$ }( f! o) r6 u# I5 l8 z" H% X
begin |' c* ~7 _( B [
wait for 1 sec
" f- q; a3 i& J: Q3 t* W+ a create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
; T* Q/ k( U! x. |/ l; } end/ P% f$ o9 K. g: C' c5 M Q+ ]
end
# N5 h# W/ Y( o) O
" X* K8 E! w. d. Z& h但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |