Try Catch End Control Flow

Hi Scilab Team i recently played a little bit with try and catch. And i struggle a little bit because it could not handle the semicolon for line ending. And afterwards, when i removed semikolon it find end anymore. It seems that the try-catch -end flow is a little bit inconsitence or stable enough.

Hi Pascal,

Could you post examples of your try?

This will help us on debugging the issues. Thanks !

→ try

 out1(i,:)=[strsplit(stdout1($-6),[" ","="])(3),strsplit(stdout1($-6),[" ","="])(5),strsplit(stdout1($-6),[" ","="])(9),strsplit(stdout1($),["= ","ms"])(2),strsplit(stdout1($),["= ","ms"])(4),strsplit(stdout1($),["= ","ms"])(6)];
catch
 out1(i,:)=[]
end

Undefinierte Variable: i

→ try;

 out1(i,:)=[strsplit(stdout1($-6),[" ","="])(3),strsplit(stdout1($-6),[" ","="])(5),strsplit(stdout1($-6),[" ","="])(9),strsplit(stdout1($),["= ","ms"])(2),strsplit(stdout1($),["= ","ms"])(4),strsplit(stdout1($),["= ","ms"])(6)];
catch
 out1(i,:)=[]
end

try;
^
Fehler: 1.1->2.1 syntax error, unexpected end of line

These two errors are expected:

  1. the i is not defined but used, and error is produced
  2. the try; is starting a try block and ending it with ; without any instruction.

Yes you have right i may confused the end of line syntax with the wright if “statement” ; and try “statement” ;. Yes that was a rule error of mine.

M.f.G. Pascal