[Scilab-users] Difference in output from mtlb_dir function between 6.0.2 and 6.1.1

classic Classic list List threaded Threaded
3 messages Options
zisper zisper
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Difference in output from mtlb_dir function between 6.0.2 and 6.1.1

Hi;

I just installed SciLab 6.1 on my Mac, and unfortunately I’ve tripped over running doing my first task.  I have a few small scripts which work fine under 6.0.2, using the mtlb_dir command to get a file list to process.  It seems like the output of the mtlb_dir command under 6.1 is different from that of 6.0.2 - which is causing my subsequent commands to fail.  I can rework the scripts so they don’t rely on mtlb_dir, but I thought I should flag it as an issue.

Sample output under 6.0.2:
--> mtlb_dir
 ans =

831x1 struct array with fields:
 dims
 name
 date
 bytes
 isdir


--> ver
 ans =


 column 1

!Scilab Version: !
! !
!Operating System: !
! !
!Java version: !
! !
!Java runtime information: !
! !
!Java Virtual Machine information: !
! !
!Vendor specification: !

 column 2

!6.0.2.0 !
! !
!Mac OS X 10.15.5 !
! !
!1.8.0_51 !
! !
!Java(TM) SE Runtime Environment (build 1.8.0_51-b16) !
! !
!Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode) !
! !
!Oracle Corporation !


And under 6.1:
mtlb_dir

*** Much Output I’ve Removed ***

ans(6)(828)

 F

 ans(6)(829)

 F

 ans(6)(830)

 F

 ans(6)(831)

 F

--> ver
 ans =

 "Scilab Version: " "6.1.1.0" 
 "Operating System: " "Mac OS X 10.15.5" 
 "Java version: " "1.8.0_51" 
 "Java runtime information: " "Java(TM) SE Runtime Environment (build 1.8.0_51-b16)" 
 "Java Virtual Machine information: " "Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)"
 "Vendor specification: " "Oracle Corporation"

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Difference in output from mtlb_dir function between 6.0.2 and 6.1.1

Hello Chris,

Le 30/06/2020 à 13:03, Chris O'Shannassy a écrit :
Hi;

I just installed SciLab 6.1 on my Mac, and unfortunately I’ve tripped over running doing my first task.  I have a few small scripts which work fine under 6.0.2, using the mtlb_dir command to get a file list to process.  It seems like the output of the mtlb_dir command under 6.1 is different from that of 6.0.2 - which is causing my subsequent commands to fail.  I can rework the scripts so they don’t rely on mtlb_dir, but I thought I should flag it as an issue.

The output of mtlb_dir() has not changes, just the display of its result. The reason is now reported.
Let's take the opportunity to see that mtlb_dir() is not up-to-date wrt the matlab version:
* nothing should be printed when no argout is specified. This is now possible in Scilab, since 6.1.0
* there are 2 missing fields: datenum, and folder.
* .. and maybe other differences.

6.1.1 is being fixed against the display issue. In addition, the parasitic "dims" field that was formerly returned is removed in 6.1.1.

A question: why don't you use the official scilab dir() function?

Regards
Samuel



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
zisper zisper
Reply | Threaded
Open this post in threaded view
|

Re: Difference in output from mtlb_dir function between 6.0.2 and 6.1.1

Sorry for the delayed response, I moved to Big Sur and it took me a while to
get 6.1 setup again.

Based on your comment, this morning I've realised what actually broke in my
script (difference between a list and a structure) and gone through my
scripts, reworking them to use the new format - and moving the Scilab dir
function rather the mtlb_dir one.

The only reason I was using mtlb_dir was because I'd initially developed the
scripts on Matlab and then ran them through the translator to move them to
Scilab.  The translated scripts worked and so I never went back through the
code and reworked them to the native Scilab function.

Thanks for pointing me in the right direction!

Chris



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users