Thread Subject: matlab compiler and nested comments

Subject: matlab compiler and nested comments

From: Brock

Date: 30 Mar, 2009 16:29:01

Message: 1 of 1

We found an issue where the matlab compiler (mcc) will produce differnt results than the command line matlab.
The issue is nested comment blocks:

% this code demonstrates a bug in mcc
disp('this is before the nested comment blocks')
%{
this = is;
commented = out;
%{
so = is;
this = ha;
%}
butThis = isAnUndeclaredVariable;
%}
disp('and this is after the nested comment blocks')

When built with 2009a or 2008b
mcc -m comment.m

It will fail with undeclared variable.
When ran with matlab:
matlab -r comment

The code runs fine.
One of our people was using comments to disable some code he was testing, which had its own comment blocks internally.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
mcc matlab comm... Brock 30 Mar, 2009 12:30:07
rssFeed for this Thread

Contact us at files@mathworks.com