Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

printf() and fprintf() with DLL-Files

27 views
Skip to first unread message

mb

unread,
Sep 24, 1997, 3:00:00 AM9/24/97
to

Hello everybody,

I'm building MATLAB V.4 MEX-Files with Borland C++ 3.1 and I have some
problems using printf() and fprint() in C.
These commands work correctly with %d and %x. But for all floating-point
data-types ,for example %f, %g, these commands don't work.
Can anybody tell me where the problem is ?

Thanks,
Markus Glaser

e-mail : wi...@isw.uni-stuttgart.de

Gary Levenson

unread,
Sep 24, 1997, 3:00:00 AM9/24/97
to

In article <3428FA...@isw.uni-stuttgart.de>,

mb <br...@isw.uni-stuttgart.de> writes:
> Hello everybody,
>
> I'm building MATLAB V.4 MEX-Files with Borland C++ 3.1 and I have some
> problems using printf() and fprint() in C.
> These commands work correctly with %d and %x. But for all floating-point
> data-types ,for example %f, %g, these commands don't work.
> Can anybody tell me where the problem is ?
>

Hi,

Believe it or not, these format specifiers are not supported in 16-bit
DLLs. There is a file on our ftp server, I think called printdll,
which works around this by using a MEX-file which calls back into
MATLAB to do the formatting.

This limitation does not exist for 32-bit DLLs, which are supported
in MATLAB 5.x

HTH.

===========================================
Gary Levenson ga...@mathworks.com
The MathWorks, Inc. ph: 508 647-7000
http://www.mathworks.com
===========================================

0 new messages