[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Detecting if a file is open
From: |
David Bateman |
Subject: |
Re: Detecting if a file is open |
Date: |
Mon, 02 Jun 2008 16:51:20 +0200 |
User-agent: |
Thunderbird 2.0.0.12 (X11/20080306) |
John W. Eaton wrote:
> On 2-Jun-2008, gOS wrote:
>
> | Except that unwind_protect is not compatible with Matlab, correct?
> | Maintaining 2 separate scripts to do the exact same thing so that I can
> | differentiate between try/catch and unwind_protect is not only unacceptable,
> | its bad coding practice and leads to maintainability issues.
>
> Until the very latest Matlab release, Matlab had no way to do the
> equivalent of unwind_protect. Now, they have of course chosen to
> implement something that sort of does the same thing, but in a
> completely different way. There has been some discussion of this
> feature on the lists already, if you are intersted in helping out.
>
To do it matlab's way we need the new OOP code of matlab introduced in
2008a in Octave and create and object with a destructor with the
unwind_protect code.. If you really have to have the matlab compatible
way of doing it then something like the thread
http://www.cae.wisc.edu/pipermail/octave-maintainers/2008-March/006503.html
is an approximation of the matlab onCleanup function.
D.
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary