Hello, 

another question to solve the locomotive stuff, giving you
a example with the not implented code. 

I don't want to code the same
stuff twice. Thats why I want to jump between lines of code. Is this
possible and how? 

P = 200;
DM = 1;

for n = 1:10
 if DM == 1 then 
 if
P > 100 then DM = 1
 P = P - 60
 disp('P bigger 100. DM = ' +
string(DM))
 else DM = 0
 P = P + 100 //instead of writing P = P + 100,
I would like ...
 disp('P smaller 100. DM = ' + string(DM))
 end 
 else
// D == 0 
 if P > 100 then DM = 1 
 disp('P bigger 100. DM = ' +
string(DM))
 P = P - 30
 else DM = 0 // ... to continue here 
 disp('P
smaller 100. DM = ' + string(DM))
 P = P + 100 // to use this P = P +
100
 end
 end 
 disp(string(n) + ' ' + string(P))
end

 
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to