Path: news.mathworks.com!not-for-mail
From: "Gautam Vallabha" <gvallabh@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: running other applications
Date: Fri, 6 Jul 2007 17:41:20 -0400
Organization: The MathWorks, Inc.
Lines: 77
Message-ID: <f6mcu0$1de$1@fred.mathworks.com>
References: <f6lh2p$4ie$1@fred.mathworks.com> <1183731582.111910.293480@w3g2000hsg.googlegroups.com> <ef5c942.6@webcrossing.raydaftYaTP> <muy3b01qvfh.fsf@G99-Boettcher.llan.ll.mit.edu> <87tzshcm9s.fsf@bravo.nunatak.allgaeu.org> <ef5c942.12@webcrossing.raydaftYaTP>
Reply-To: "Gautam Vallabha" <gvallabh@mathworks.com>
NNTP-Posting-Host: vallabhag.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1183758080 1454 144.212.219.185 (6 Jul 2007 21:41:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 6 Jul 2007 21:41:20 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
Xref: news.mathworks.com comp.soft-sys.matlab:417671




Furthermore problems with mlex (which is a nice party trick, I admit):

>> mlex 'asd b sdf sd f'
ans =
    'asd'    'b'    'sdf'    'sd'    'f'

% So far so good, but ...
% semicolons, single quotes, commas and percent markers all cause mlex to 
break:

>> mlex 'asd b sdf sd f; sdfa'
??? Error using ==> eval
Undefined function or variable 'sdfa'.

Error in ==> mlex at 2
      eval(['mlex1 ', str, ' ;']);

>> mlex 'asd b sdf sd f'' sdfa'
??? Error: A MATLAB string constant is not terminated properly.

Error in ==> mlex at 2
      eval(['mlex1 ', str, ' ;']);

>> mlex 'asd b sdf sd f, sdfa'
ans =
    'asd'    'b'    'sdf'    'sd'    'f'
??? Error using ==> eval
Undefined function or variable 'sdfa'.

Error in ==> mlex at 2
      eval(['mlex1 ', str, ' ;']);

>> mlex 'asd b sdf sd f% sdfa'
ans =
    'asd'    'b'    'sdf'    'sd'    'f'
ans =
    'asd'    'b'    'sdf'    'sd'    'f'


------------------
Also, try this:

>> str = ['a b c; ' char(13) 'quit']
>> mlex(str)

I hope no one is using MLEX to implement a CGI script ...

-- 

Gautam Vallabha
The MathWorks
Email: Gautam.Vallabha@mathworks.com


"us" <us@neurol.unizh.ch> wrote in message 
news:ef5c942.12@webcrossing.raydaftYaTP...
> Ralph Schleicher:
> <SNIP a very seasoned CSSMer fighting for <eval>...
>
>
> % let's put this code into <mlex.m>
> % run
>     mlex 'this is a test'
> % ans = 'this' 'is' 'a' 'test'
>
> % -but-
>     strread('this is a test','%s').'
> % ans = 'this' 'is' 'a' 'test'
>
> most likely, however, i'm missing something...
> best from zurich
> urs
>
> ps: just one of the counter-examples... :-)